Package org.cybergarage.upnp.event

Examples of org.cybergarage.upnp.event.SubscriptionResponse


    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;
     
    }
    service.clearSID();
    return false;
View Full Code Here


  {
    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());
      return true;
    }
    service.clearSID();
    return false;
  }
View Full Code Here

 
  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

  // eventSubscribe
  // //////////////////////////////////////////////

  private void upnpBadSubscriptionRecieved(SubscriptionRequest subReq,
      int code) {
    SubscriptionResponse subRes = new SubscriptionResponse();
    subRes.setErrorResponse(code);
    subReq.post(subRes);
  }
View Full Code Here

    sub.setDeliveryURL(callback);
    sub.setTimeOut(timeOut);
    sub.setSID(sid);
    service.addSubscriber(sub);

    SubscriptionResponse subRes = new SubscriptionResponse();
    subRes.setStatusCode(HTTPStatus.OK);
    subRes.setSID(sid);
    subRes.setTimeout(timeOut);
    if (Debug.isOn() == true)
      subRes.print();
    subReq.post(subRes);

    if (Debug.isOn() == true)
      subRes.print();

    service.notifyAllStateVariables();
  }
View Full Code Here

    long timeOut = subReq.getTimeout();
    sub.setTimeOut(timeOut);
    sub.renew();

    SubscriptionResponse subRes = new SubscriptionResponse();
    subRes.setStatusCode(HTTPStatus.OK);
    subRes.setSID(sid);
    subRes.setTimeout(timeOut);
    subReq.post(subRes);

    if (Debug.isOn() == true)
      subRes.print();
  }
View Full Code Here

      return;
    }

    service.removeSubscriber(sub);

    SubscriptionResponse subRes = new SubscriptionResponse();
    subRes.setStatusCode(HTTPStatus.OK);
    subReq.post(subRes);

    if (Debug.isOn() == true)
      subRes.print();
  }
View Full Code Here

TOP

Related Classes of org.cybergarage.upnp.event.SubscriptionResponse

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.