Package org.oasis_open.docs.wsn.b_2

Examples of org.oasis_open.docs.wsn.b_2.PauseSubscription


        }
    }

    @Override
    protected void renew(XMLGregorianCalendar terminationTime) throws UnacceptableTerminationTimeFault {
        UnacceptableTerminationTimeFaultType fault = new UnacceptableTerminationTimeFaultType();
        throw new UnacceptableTerminationTimeFault("TerminationTime is not supported", fault);
    }
View Full Code Here


    protected XMLGregorianCalendar validateTerminationTime(String value)
        throws UnacceptableTerminationTimeFault {
        XMLGregorianCalendar tt = parseTerminationTime(value);
        if (tt == null) {
            UnacceptableTerminationTimeFaultType fault = new UnacceptableTerminationTimeFaultType();
            throw new UnacceptableTerminationTimeFault("Unable to parse termination time: '"
                + value + "'", fault);
        }
        XMLGregorianCalendar ct = getCurrentTime();
        int c = tt.compare(ct);
        if (c == DatatypeConstants.LESSER || c == DatatypeConstants.EQUAL) {
            UnacceptableTerminationTimeFaultType fault = new UnacceptableTerminationTimeFaultType();
            fault.setMinimumTime(ct);
            throw new UnacceptableTerminationTimeFault("Invalid termination time", fault);
        }
        return tt;
    }
View Full Code Here

                    p = e.getValue();
                }
                if (p instanceof UseRaw) {
                    useRaw = true;
                } else {
                    UnrecognizedPolicyRequestFaultType fault = new UnrecognizedPolicyRequestFaultType();
                    throw new UnrecognizedPolicyRequestFault("Unrecognized policy: " + p, fault);
                }
            }
        }
        // Check all parameters
View Full Code Here

    public void resume() throws JBIException {
        request(new ResumeSubscription());
    }

    public void unsubscribe() throws JBIException {
        request(new Unsubscribe());
    }
View Full Code Here

                      targetNamespace = "http://docs.oasis-open.org/wsn/b-2",
                      partName = "UnsubscribeRequest")
            Unsubscribe unsubscribeRequest) throws ResourceUnknownFault, UnableToDestroySubscriptionFault {

        broker.unsubscribe(getAddress());
        return new UnsubscribeResponse();
    }
View Full Code Here

                    out.setContent(new StringSource(writer.toString()));
                    exchange.setMessage(out, "out");
                    send(exchange);
                } else if (input instanceof Unsubscribe) {
                    subscription = null;
                    UnsubscribeResponse response = new UnsubscribeResponse();
                    StringWriter writer = new StringWriter();
                    jaxbContext.createMarshaller().marshal(response, writer);
                    NormalizedMessage out = exchange.createMessage();
                    out.setContent(new StringSource(writer.toString()));
                    exchange.setMessage(out, "out");
View Full Code Here

                          name = "Unsubscribe",
                          targetNamespace = "http://docs.oasis-open.org/wsn/b-2")
                    Unsubscribe unsubscribeRequest)
            throws ResourceUnknownFault, UnableToDestroySubscriptionFault {
            Publisher.this.unsubscribe(topic);
            return new UnsubscribeResponse();
        }
View Full Code Here

                      targetNamespace = "http://docs.oasis-open.org/wsn/b-2",
                      partName = "UnsubscribeRequest")
            Unsubscribe unsubscribeRequest) throws ResourceUnknownFault, UnableToDestroySubscriptionFault {

        broker.unsubscribe(getAddress());
        return new UnsubscribeResponse();
    }
View Full Code Here

                    new JAXBElement<QueryExpressionType>(AbstractSubscription.QNAME_MESSAGE_CONTENT,
                            QueryExpressionType.class, xpathExp));
        }
        if (raw) {
            subscribe.setSubscriptionPolicy(new Subscribe.SubscriptionPolicy());
            subscribe.getSubscriptionPolicy().getAny().add(new UseRaw());
        }
        return subscribe;
    }
View Full Code Here

                    new JAXBElement<QueryExpressionType>(AbstractSubscription.QNAME_MESSAGE_CONTENT,
                            QueryExpressionType.class, xpathExp));
        }
        if (raw) {
            subscribeRequest.setSubscriptionPolicy(new Subscribe.SubscriptionPolicy());
            subscribeRequest.getSubscriptionPolicy().getAny().add(new UseRaw());
        }
        SubscribeResponse response = (SubscribeResponse) request(subscribeRequest);
        return new Subscription(response.getSubscriptionReference(), getClient());
    }
View Full Code Here

TOP

Related Classes of org.oasis_open.docs.wsn.b_2.PauseSubscription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.