Examples of Subscribe


Examples of akka.zeromq.Subscribe

public class JavaZeroMQStreamSuite extends LocalJavaStreamingContext {

  @Test // tests the API, does not actually test data receiving
  public void testZeroMQStream() {
    String publishUrl = "abc";
    Subscribe subscribe = new Subscribe((ByteString)null);
    Function<byte[][], Iterable<String>> bytesToObjects = new Function<byte[][], Iterable<String>>() {
      @Override
      public Iterable<String> call(byte[][] bytes) throws Exception {
        return null;
      }
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.Subscribe

          ResourceUnknownFaultType,
          TopicPathDialectUnknownFaultType,
          RemoteException,
          MalformedURIException
   {
      Subscribe request = new Subscribe(  );
      // Create an endpoint reference for the NotificationConsumer
      // Note that since we are using PortListener to handle notifications,
      // rather than a Web Service that implements NotificationConsumer this
      // EPR is somewhat bogus.
      EndpointReferenceType epr = new EndpointReferenceType(  );
      epr.setAddress( new AttributedURI( callback_url ) );
      epr.setPortType( new AttributedQName( "nothing" ) );
      ServiceNameType snt = new ServiceNameType(  );
      snt.setPortName( new NCName( "NotificationConsumer" ) );
      snt.set_value( new QName( "TestNotifConsumer" ) );
      epr.setServiceName( snt );

      // Set a couple of reference properties, including a ResourceID.
      MessageElement[] prop = new MessageElement[2];
      MessageElement   propsResourceID =
         new SOAPBodyElement( MuseAddressingConstants.REFERENCE_PROP_QNAME_RESOURCE_ID, "4444" );
      prop[0] = propsResourceID;
      MessageElement otherProp = new SOAPBodyElement( new QName( "http://com.xyz/props", "myprop" ),
                                                      "foo" );
      prop[1] = otherProp;
      ReferencePropertiesType props = new ReferencePropertiesType(  );
      props.set_any( prop );
      epr.setReferenceProperties( props );
      request.setConsumerReference( epr );

      // Build the TopicExpressionType for the request.
      TopicExpressionType tet = new TopicExpressionType(  );

      // Currently on the Simple dialect is supported.
      tet.setDialect( new URI( TopicsConstants.DIALECT_TOPIC_EXPRESSION_SIMPLE ) );
      tet.set_any( this.buildTopicExpressionTypeAny( propQname ) );
      request.setTopicExpression( tet );

      // Setup other subscription information.
      Calendar terminationTime = Calendar.getInstance(  );
      terminationTime.add( Calendar.HOUR, 1 ); // expire this subscription in 1 hour
      request.setInitialTerminationTime( terminationTime );
      request.setPrecondition( new QueryExpressionType(  ) );
      request.setSelector( new QueryExpressionType(  ) );
      request.setSubscriptionPolicy( null );

      // useNotify == true indicates that the Notification will be wrapped in a wsnt:Notify element.
      request.setUseNotify( new Boolean( true ) );

      // Issue the actual request to subscribe
      SubscribeResponse response = m_stub.subscribe( request );

      return response;
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.Subscribe

      //ref_prop.set_any();
      axis_endpoint.setReferenceProperties( ref_prop );

      //axis_endpoint.set_any();
      Subscribe subscribe = new Subscribe(  );
      subscribe.setConsumerReference( axis_endpoint );
      subscribe.setInitialTerminationTime( termination );

      //subscribe.setPrecondition();
      //subscribe.setSelector();
      //subscribe.setSubscriptionPolicy();
      //subscribe.setTopicExpression();
      subscribe.setUseNotify( new Boolean( isNotify ) );

      SubscriptionRequest subreq = new SubscriptionRequestImpl( subscribe );

      org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType consumer = subreq.getConsumer(  );
      validateEndpointsMatch( consumer, axis_endpoint );
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.Subscribe

         // locate the sensor service
         EndpointReferenceType     sensorEpr = endpointReferences[i];
         SensorSoapHttpBindingStub sensor = getSensorService( sensorEpr );

         // build the request to subscribe to the sensor services' change notifications
         Subscribe         subscribeRequest  = buildSubscribe( sensorEpr );
         SubscribeResponse subscribeResponse = sensor.subscribe( subscribeRequest );

         // the subscription request succeeded - remember the EPR to the new subscription in case we need to unsubscribe
         m_subscriptions.add( subscribeResponse.getSubscriptionReference(  ) );
      }
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.Subscribe

    */
   private Subscribe buildSubscribe( EndpointReferenceType sensorEpr )
   throws URI.MalformedURIException
   {
      // First the _Subscribe request must be setup.
      Subscribe request = new Subscribe(  );

      //create the EPR of the consumer - this EPR object is a specific type for use with the client-side stub
      axis.org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType consumerEprForStub =
         new axis.org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType(  );
      consumerEprForStub.setAddress( new AttributedURI( m_notificationConsumer.getAddress(  ) ) );
      consumerEprForStub.setPortType( new AttributedQName( m_notificationConsumer.getPortType(  ) ) );
      ServiceNameType snt = new ServiceNameType(  );
      snt.setPortName( new NCName( m_notificationConsumer.getServiceName(  ).getPort(  ) ) );
      snt.set_value( m_notificationConsumer.getServiceName(  ) );
      consumerEprForStub.setServiceName( snt );

      // ... this puts the reference property for ResourceID in the EPR
      /*
         MessageElement[] prop            = new MessageElement[1];
         String           resourceId      = AddressingUtils.getResourceId( m_notificationConsumer.getProperties(  ) );
         MessageElement   propsResourceId =
            new SOAPBodyElement( MuseAddressingConstants.REFERENCE_PROP_QNAME_RESOURCE_ID, resourceId );
         prop[0] = propsResourceId;
         org.xmlsoap.schemas.ws._2003._03.addressing.ReferencePropertiesType props =
            new org.xmlsoap.schemas.ws._2003._03.addressing.ReferencePropertiesType(  );
         props.set_any( prop );
         consumerEprForStub.setReferenceProperties( props );
       */
      request.setConsumerReference( consumerEprForStub );

      // Set up the request to ask for a subscription to the change notification of the given Resource Property
      TopicExpressionType tet = new TopicExpressionType(  );
      tet.setDialect( new URI( TopicsConstants.DIALECT_TOPIC_EXPRESSION_SIMPLE ) );
      tet.set_any( new MessageElement[]
                   {
                      new MessageElement( SensorWsdmServiceWSResource.PropertyQNames.TEMPERATURE )
                   } );
      request.setTopicExpression( tet );

      Calendar terminationTime = Calendar.getInstance(  );
      terminationTime.add( Calendar.HOUR, 24 ); // expire this subscription in 24 hours
      request.setInitialTerminationTime( terminationTime );
      request.setPrecondition( null );
      request.setSelector( null );
      request.setSubscriptionPolicy( null );
      request.setUseNotify( Boolean.TRUE );

      return request;
   }
View Full Code Here

Examples of com.cxy.redisclient.integration.pubsub.Subscribe

    Publish command = new Publish(id, channel, message);
    command.execute();
  }
 
  public void subscribe(int id, JedisPubSub callback, String channels){
    Subscribe command = new Subscribe(id, callback, channels);
    command.execute();
  }
View Full Code Here

Examples of com.cxy.redisclient.presentation.pubsub.Subscribe

 
  private void subscribe() {
    int id = (Integer) itemsSelected[0].getData(NODE_ID);
   
    if(!openSubscribe.isOpen(id)){
      final Subscribe subscribe = new Subscribe(tabFolder_1, id);
      CTabItem  tabItem = subscribe.init();
      openSubscribe.add(subscribe);
      tabItem.addDisposeListener(new DisposeListener() {
        public void widgetDisposed(DisposeEvent e) {
          openSubscribe.remove(subscribe);
        }
View Full Code Here

Examples of com.netflix.eventbus.spi.Subscribe

     *
     * @return The {@link EventConsumer} instance. <code>null</code> if none found.
     */
    private EventConsumer findEventConsumerForSubscriberMethod(SubscriberInfo subscriberInfo, String callDescription) {
        Method subscriberMethod = subscriberInfo.getSubscriberMethod();
        Subscribe subscribeAnnotation = subscriberMethod.getAnnotation(Subscribe.class);
        if (null == subscribeAnnotation) {
            LOGGER.error(String.format("The subscriber method: %s is not annotated with @Subscribe. Ignoring %s call.",
                    subscriberMethod, callDescription));
            return null;
        }
View Full Code Here

Examples of org.activemq.ws.xmlbeans.notification.base.SubscribeDocument.Subscribe

   
    protected void fireDemandChangeEvent(boolean inDemand) {
        NotificationProducer p = createPublisherNotificationProducer();
        if( inDemand ) {
            SubscribeDocument requestDoc = SubscribeDocument.Factory.newInstance();
            Subscribe subscribe = requestDoc.addNewSubscribe();
            subscribe.setTopicExpression( TopicExpressionConverter.toTopicExpression(topic) );
            subscribe.setUseNotify(true);
            subscribe.setConsumerReference(endpointReference);
            SubscribeResponseDocument reponse = p.Subscribe(requestDoc);
        } else {
            UnsubscribeDocument requestDoc = UnsubscribeDocument.Factory.newInstance();
            Unsubscribe unsubscribe = requestDoc.addNewUnsubscribe();           
        }
View Full Code Here

Examples of org.agilewiki.jactor.pubsub.publisher.Subscribe

        while (i < s) {
            Sub sub = new Sub();
            sub.initialize(getMailbox());
            sub.setActorName("" + i);
            sub.src = this;
            Subscribe subscribe = new Subscribe(sub);
            subscribe.sendEvent(this, pub);
            i += 1;
        }
        ExtendedResponseProcessor<Integer> erp = new ExtendedResponseProcessor<Integer>() {
            @Override
            public void processResponse(Integer response) throws Exception {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.