Package org.oasis_open.docs.wsn.br_2

Examples of org.oasis_open.docs.wsn.br_2.PublisherRegistrationFailedFaultType


  protected void validatePublisher(RegisterPublisher registerPublisherRequest) throws InvalidTopicExpressionFault, PublisherRegistrationFailedFault, PublisherRegistrationRejectedFault, ResourceUnknownFault, TopicNotSupportedFault {
    super.validatePublisher(registerPublisherRequest);
    String[] parts = split(publisherReference.getAddress().getValue());
    endpoint = getContext().getEndpoint(new QName(parts[0], parts[1]), parts[2]);
    if (endpoint == null) {
      PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
      throw new PublisherRegistrationFailedFault("Unable to resolve consumer reference endpoint", fault);
    }
  }
View Full Code Here


      try {
        advisory = new ConsumerEventSource(connection, jmsTopic);
        advisory.setConsumerListener(this);
        advisory.start();
      } catch (Exception e) {
        PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
        throw new PublisherRegistrationFailedFault("Error starting demand-based publisher", fault, e);
      }
    }
  }
View Full Code Here

            }
            success = true;
            return response;
        } catch (EndpointRegistrationException e) {
            LOGGER.log(Level.WARNING, "Unable to register new endpoint", e);
            PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
            throw new PublisherRegistrationFailedFault("Unable to register new endpoint", fault, e);
        } finally {
            if (!success && publisher != null) {
                try {
                    publisher.destroy();
View Full Code Here

        demand = registerPublisherRequest.isDemand() != null
            ? registerPublisherRequest.isDemand().booleanValue()
                : false;
        // Check all parameters
        if (publisherReference == null && demand) {
            PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
            throw new PublisherRegistrationFailedFault("Invalid PublisherReference: null", fault);
        }
        if (demand && (topic == null || topic.size() == 0)) {
            InvalidTopicExpressionFaultType fault = new InvalidTopicExpressionFaultType();
            throw new InvalidTopicExpressionFault(
View Full Code Here

            }
            success = true;
            return response;
        } catch (EndpointRegistrationException e) {
            LOGGER.log(Level.WARNING, "Unable to register new endpoint", e);
            PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
            throw new PublisherRegistrationFailedFault("Unable to register new endpoint", fault, e);
        } finally {
            if (!success && publisher != null) {
                try {
                    publisher.destroy();
View Full Code Here

                    advisory.setConsumerListener(this);
                    advisory.start();
                    advisories.add(advisory);
                }
            } catch (Exception e) {
                PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
                throw new PublisherRegistrationFailedFault("Error starting demand-based publisher", fault, e);
            }
        }
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.springframework.beans.factory.FactoryBean#getObject()
     */
    public Object getObject() throws Exception {
        RegisterPublisher registerPublisher = new RegisterPublisher();
        registerPublisher.setPublisherReference(AbstractWSAClient.createWSA(publisher));
        if (topic != null) {
            TopicExpressionType topicExp = new TopicExpressionType();
            topicExp.getContent().add(topic);
            registerPublisher.getTopic().add(topicExp);
        }
        registerPublisher.setDemand(Boolean.valueOf(demand));
        return registerPublisher;
    }
View Full Code Here

    }

    public Publisher registerPublisher(EndpointReferenceType publisherReference,
                                       String topic, boolean demand) throws JBIException {

        RegisterPublisher registerPublisherRequest = new RegisterPublisher();
        registerPublisherRequest.setPublisherReference(publisherReference);
        if (topic != null) {
            TopicExpressionType topicExp = new TopicExpressionType();
            topicExp.getContent().add(topic);
            registerPublisherRequest.getTopic().add(topicExp);
        }
        registerPublisherRequest.setDemand(Boolean.valueOf(demand));
        RegisterPublisherResponse response = (RegisterPublisherResponse) request(registerPublisherRequest);
        return new Publisher(response.getPublisherRegistrationReference(), getClient());
    }
View Full Code Here

        throws TopicNotSupportedFault, PublisherRegistrationFailedFault,
        UnacceptableInitialTerminationTimeFault, InvalidTopicExpressionFault, ResourceUnknownFault,
        PublisherRegistrationRejectedFault {
        //CHECKSTYLE:ON

        RegisterPublisher registerPublisherRequest = new RegisterPublisher();
        registerPublisherRequest.setPublisherReference(publisher.getEpr());
        if (topics != null) {
            for (String topic : topics) {
                TopicExpressionType topicExp = new TopicExpressionType();
                topicExp.getContent().add(topic);
                registerPublisherRequest.getTopic().add(topicExp);
            }
        }
        registerPublisherRequest.setDemand(demand);
        RegisterPublisherResponse response = broker.registerPublisher(registerPublisherRequest);
        return new Registration(response.getPublisherRegistrationReference());
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.springframework.beans.factory.FactoryBean#getObject()
     */
    public Object getObject() throws Exception {
        RegisterPublisher registerPublisher = new RegisterPublisher();
        registerPublisher.setPublisherReference(AbstractWSAClient.createWSA(publisher));
        if (topic != null) {
            TopicExpressionType topicExp = new TopicExpressionType();
            topicExp.getContent().add(topic);
            registerPublisher.getTopic().add(topicExp);
        }
        registerPublisher.setDemand(new Boolean(demand));
        return registerPublisher;
    }
View Full Code Here

TOP

Related Classes of org.oasis_open.docs.wsn.br_2.PublisherRegistrationFailedFaultType

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.