Package org.oasis_open.docs.wsn.b_2

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


            GetMessages getMessagesRequest) throws ResourceUnknownFault, UnableToGetMessagesFault {

        log.debug("GetMessages");
        BigInteger max = getMessagesRequest.getMaximumNumber();
        List<NotificationMessageHolderType> messages = getMessages(max != null ? max.intValue() : 0);
        GetMessagesResponse response = new GetMessagesResponse();
        response.getNotificationMessage().addAll(messages);
        return response;
    }
View Full Code Here


    }

    public List<NotificationMessageHolderType> getMessages(int max) throws JBIException {
        GetMessages getMessages = new GetMessages();
        getMessages.setMaximumNumber(BigInteger.valueOf(max));
        GetMessagesResponse response = (GetMessagesResponse) request(getMessages);
        return response.getNotificationMessage();
    }
View Full Code Here

    public List<NotificationMessageHolderType> getMessages(long max)
        throws UnableToGetMessagesFault, ResourceUnknownFault {
        GetMessages getMessages = new GetMessages();
        getMessages.setMaximumNumber(BigInteger.valueOf(max));
        GetMessagesResponse response = pullPoint.getMessages(getMessages);
        return response.getNotificationMessage();
    }
View Full Code Here

        throws ResourceUnknownFault {
     
      log.debug("GetMessages");
      BigInteger max = getMessagesRequest.getMaximumNumber();
      List<NotificationMessageHolderType> messages = getMessages(max != null ? max.intValue() : 0);
      GetMessagesResponse response = new GetMessagesResponse();
      response.getNotificationMessage().addAll(messages);
      return response;
    }
View Full Code Here

    }

  public List<NotificationMessageHolderType> getMessages(int max) throws JBIException {
    GetMessages getMessages = new GetMessages();
    getMessages.setMaximumNumber(BigInteger.valueOf(max));
    GetMessagesResponse response = (GetMessagesResponse) request(getMessages);
    return response.getNotificationMessage();
  }
View Full Code Here

    public List<NotificationMessageHolderType> getMessages(long max)
        throws UnableToGetMessagesFault, ResourceUnknownFault {
        GetMessages getMessages = new GetMessages();
        getMessages.setMaximumNumber(BigInteger.valueOf(max));
        GetMessagesResponse response = pullPoint.getMessages(getMessages);
        return response.getNotificationMessage();
    }
View Full Code Here

            GetMessages getMessagesRequest) throws ResourceUnknownFault, UnableToGetMessagesFault {

        LOGGER.finest("GetMessages");
        BigInteger max = getMessagesRequest.getMaximumNumber();
        List<NotificationMessageHolderType> messages = getMessages(max != null ? max.intValue() : 0);
        GetMessagesResponse response = new GetMessagesResponse();
        response.getNotificationMessage().addAll(messages);
        return response;
    }
View Full Code Here

                        // Defaults to XPath 1.0
                        if (contentFilter.getDialect() == null) {
                            contentFilter.setDialect(XPATH1_URI);
                        }
                    } else {
                        InvalidFilterFaultType fault = new InvalidFilterFaultType();
                        throw new InvalidFilterFault("Unrecognized filter: " + (e != null ? e.getName() : f), fault);
                    }
                } else {
                    InvalidFilterFaultType fault = new InvalidFilterFaultType();
                    throw new InvalidFilterFault("Unrecognized filter: " + (e != null ? e.getName() : f), fault);
                }
            }
        }
        // Check policy
        if (subscribeRequest.getSubscriptionPolicy() != null) {
            for (Object p : subscribeRequest.getSubscriptionPolicy().getAny()) {
                JAXBElement e = null;
                if (p instanceof JAXBElement) {
                    e = (JAXBElement) p;
                    p = e.getValue();
                }
                if (p instanceof UseRaw) {
                    useRaw = true;
                } else {
                    InvalidFilterFaultType fault = new InvalidFilterFaultType();
                    throw new InvalidFilterFault("Unrecognized policy: " + p, fault);
                }
            }
        }
        // Check all parameters
        if (consumerReference == null) {
            SubscribeCreationFailedFaultType fault = new SubscribeCreationFailedFaultType();
            throw new SubscribeCreationFailedFault("Invalid ConsumerReference: null", fault);
        }
        // TODO check we can resolve endpoint
        if (topic == null) {
            InvalidFilterFaultType fault = new InvalidFilterFaultType();
            throw new InvalidFilterFault("Must specify a topic to subscribe on", fault);
        }
        if (contentFilter != null && !contentFilter.getDialect().equals(XPATH1_URI)) {
            InvalidMessageContentExpressionFaultType fault = new InvalidMessageContentExpressionFaultType();
            throw new InvalidMessageContentExpressionFault("Unsupported MessageContent dialect: '"
View Full Code Here

                    topic = (TopicExpressionType) f;
                }
            }
        }
        if (topic == null) {
            InvalidFilterFaultType fault = new InvalidFilterFaultType();
            throw new InvalidFilterFault("Must specify a topic to subscribe on", fault);
        }
        PublisherSubscription pub = new PublisherSubscription(topic);
        SubscribeResponse response = new SubscribeResponse();
        response.setSubscriptionReference(pub.getEpr());
View Full Code Here

                        // Defaults to XPath 1.0
                        if (contentFilter.getDialect() == null) {
                            contentFilter.setDialect(XPATH1_URI);
                        }
                    } else {
                        InvalidFilterFaultType fault = new InvalidFilterFaultType();
                        throw new InvalidFilterFault("Unrecognized filter: "
                            + (e != null ? e.getName() : f), fault);
                    }
                } else {
                    InvalidFilterFaultType fault = new InvalidFilterFaultType();
                    throw new InvalidFilterFault("Unrecognized filter: "
                        + (e != null ? e.getName() : f), fault);
                }
            }
        }
        // Check policy
        if (subscribeRequest.getSubscriptionPolicy() != null) {
            for (Object p : subscribeRequest.getSubscriptionPolicy().getAny()) {
                JAXBElement e = null;
                if (p instanceof JAXBElement) {
                    e = (JAXBElement) p;
                    p = e.getValue();
                }
                if (p instanceof UseRaw) {
                    useRaw = true;
                } else {
                    UnrecognizedPolicyRequestFaultType fault = new UnrecognizedPolicyRequestFaultType();
                    throw new UnrecognizedPolicyRequestFault("Unrecognized policy: " + p, fault);
                }
            }
        }
        // Check all parameters
        if (consumerReference == null) {
            SubscribeCreationFailedFaultType fault = new SubscribeCreationFailedFaultType();
            throw new SubscribeCreationFailedFault("Invalid ConsumerReference: null", fault);
        }
        // TODO check we can resolve endpoint
        if (topic == null) {
            InvalidFilterFaultType fault = new InvalidFilterFaultType();
            throw new InvalidFilterFault("Must specify a topic to subscribe on", fault);
        }
        if (contentFilter != null && !contentFilter.getDialect().equals(XPATH1_URI)) {
            InvalidMessageContentExpressionFaultType fault = new InvalidMessageContentExpressionFaultType();
            throw new InvalidMessageContentExpressionFault("Unsupported MessageContent dialect: '"
View Full Code Here

TOP

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

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.