Examples of SubscriptionRequest


Examples of org.apache.ws.resource.notification.SubscriptionRequest

    */
   public void testBlockSizeSubscribe(  )
   throws Exception
   {
      TopicDocument         topic     = createBlockSizeTopic(  );
      SubscriptionRequest   sr        = createSubscriptionRequest( topic );
      EndpointReferenceType subMgrEpr = null;

      subMgrEpr = m_notificationManager.subscribe( sr );

      // Test Address Value
View Full Code Here

Examples of org.apache.ws.resource.notification.SubscriptionRequest

    */
   public void testManufacturerSubscribe(  )
   throws Exception
   {
      TopicDocument         topic     = createManufacturerTopic(  );
      SubscriptionRequest   sr        = createSubscriptionRequest( topic );
      EndpointReferenceType subMgrEpr = null;

      subMgrEpr = m_notificationManager.subscribe( sr );

      // Test Address Value
View Full Code Here

Examples of org.apache.ws.resource.notification.SubscriptionRequest

   public void testResourceStateSubscribe(  )
   throws Exception
   {
      TopicDocument topic = createMuwsResourceStateTopic(  );
      ;
      SubscriptionRequest   sr        = createSubscriptionRequest( topic );
      EndpointReferenceType subMgrEpr = null;

      subMgrEpr = m_notificationManager.subscribe( sr );

      testAddress( subMgrEpr );
View Full Code Here

Examples of org.apache.ws.resource.notification.SubscriptionRequest

    */
   public void testSubscribeToTopicWithInvalidDialect(  )
   throws Exception
   {
      TopicDocument       topicDoc = createTopicWithInvalidDialect(  );
      SubscriptionRequest sr = createSubscriptionRequest( topicDoc );

      try
      {
         m_notificationManager.subscribe( sr );
      }
View Full Code Here

Examples of org.apache.ws.resource.notification.SubscriptionRequest

    */
   public void testSubscribeToTopicWithInvalidNS(  )
   throws Exception
   {
      TopicDocument       topicDoc = createTopicWithInvalidNS(  );
      SubscriptionRequest sr = createSubscriptionRequest( topicDoc );

      try
      {
         m_notificationManager.subscribe( sr );
      }
View Full Code Here

Examples of org.apache.ws.resource.notification.SubscriptionRequest

    */
   public void testSubscribeToTopicWithInvalidName(  )
   throws Exception
   {
      TopicDocument       topicDoc = createTopicWithInvalidName(  );
      SubscriptionRequest sr = createSubscriptionRequest( topicDoc );

      try
      {
         m_notificationManager.subscribe( sr );
      }
View Full Code Here

Examples of org.apache.ws.resource.notification.SubscriptionRequest

   throws URISyntaxException
   {
      EndpointReferenceType consumer        = EndpointReferenceType.Factory.newInstance(  );
      Calendar              terminationTime = Calendar.getInstance(  );
      terminationTime.add( Calendar.HOUR, 1 ); // expire this subscription in 1 hour
      SubscriptionRequest sr =
         new SubscriptionRequestImpl( consumer, topic, null,
                                      new URI( TopicsConstants.DIALECT_TOPIC_EXPRESSION_SIMPLE ), null,
                                      new URI( TopicsConstants.DIALECT_TOPIC_EXPRESSION_SIMPLE ), true, null,
                                      terminationTime );
View Full Code Here

Examples of org.cybergarage.upnp.event.SubscriptionRequest

    return service.isSubscribed();
  }
 
  public boolean unsubscribe(Service service)
  {
    SubscriptionRequest subReq = new SubscriptionRequest();
    subReq.setUnsubscribeRequest(service);
    SubscriptionResponse subRes = subReq.post();
    if (subRes.isSuccessful() == true) {
      service.clearSID();
      return true;
    }
    return false;
View Full Code Here

Examples of org.cybergarage.upnp.event.SubscriptionRequest

   
    Device rootDev = service.getRootDevice();
    if (rootDev == null)
      return false;
    String ifAddress = rootDev.getInterfaceAddress();    
    SubscriptionRequest subReq = new SubscriptionRequest();
    subReq.setSubscribeRequest(service, getEventSubCallbackURL(ifAddress), timeout);
    SubscriptionResponse subRes = subReq.post();
    if (subRes.isSuccessful() == true) {
      service.setSID(subRes.getSID());
      service.setTimeout(subRes.getTimeout());
      return true;
     
View Full Code Here

Examples of org.cybergarage.upnp.event.SubscriptionRequest

    return subscribe(service, Subscription.INFINITE_VALUE);
  }

  public boolean subscribe(Service service, String uuid, long timeout)
  {
    SubscriptionRequest subReq = new SubscriptionRequest();
    subReq.setRenewRequest(service, uuid, timeout);
    if (Debug.isOn() == true)
      subReq.print()
    SubscriptionResponse subRes = subReq.post();
    if (Debug.isOn() == true)
      subRes.print()
    if (subRes.isSuccessful() == true) {
      service.setSID(subRes.getSID());
      service.setTimeout(subRes.getTimeout());
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.