Examples of SubscribeResponse


Examples of org.apache.cxf.ws.eventing.SubscribeResponse

    protected abstract SubscriptionManagerInterfaceForEventSources getSubscriptionManagerBackend();

    protected SubscribeResponse generateResponseMessageFor(SubscriptionTicketGrantingResponse dbResponse,
                                                           boolean shouldConvertToDuration) {
        SubscribeResponse ret = new SubscribeResponse();
        // SubscriptionManager part
        ret.setSubscriptionManager(dbResponse.getSubscriptionManagerReference());
        // Expires part
        if (shouldConvertToDuration) {
            ret.setGrantedExpires(
                    DurationAndDateUtil.toExpirationTypeContainingDuration(dbResponse.getExpires()));
        } else {
            ret.setGrantedExpires(
                    DurationAndDateUtil.toExpirationTypeContainingGregorianCalendar(dbResponse.getExpires()));
        }
        return ret;
    }
View Full Code Here

Examples of org.apache.hedwig.protocol.PubSubProtocol.SubscribeResponse

                                                     pubSubData.subscriberId);
            SubscriptionPreferences preferences = null;
            if (response.hasResponseBody()) {
                ResponseBody respBody = response.getResponseBody();
                if (respBody.hasSubscribeResponse()) {
                    SubscribeResponse resp = respBody.getSubscribeResponse();
                    if (resp.hasPreferences()) {
                        preferences = resp.getPreferences();
                        if (logger.isDebugEnabled()) {
                            logger.debug("Receive subscription preferences for {} : {}",
                                         va(ts,
                                            SubscriptionStateUtils.toString(preferences)));
                        }
View Full Code Here

Examples of org.apache.muse.ws.notification.impl.SubscribeResponse

    {
        Subscribe sub = new Subscribe(consumer, filter, termination);
       
        Element responseXML = invoke(WsnConstants.SUBSCRIBE_URI, sub.toXML());
       
        SubscribeResponse response = new SubscribeResponse(responseXML);
        EndpointReference epr = response.getSubscriptionReference();
       
        return new SubscriptionClient(epr, getSource());
    }
View Full Code Here

Examples of org.apache.muse.ws.notification.impl.SubscribeResponse

    {
        Subscribe sub = new Subscribe(consumer, filter, termination);
       
        Element responseXML = invoke(WsnConstants.SUBSCRIBE_URI, sub.toXML());
       
        SubscribeResponse response = new SubscribeResponse(responseXML);
        EndpointReference epr = response.getSubscriptionReference();
       
        return new SubscriptionClient(epr, getSource());
    }
View Full Code Here

Examples of org.jboss.ws.extensions.eventing.jaxws.SubscribeResponse

         request.setDelivery(delivery);
         request.setEndTo(delivery.getNotifyTo());
         request.setFilter(getDefaultFilter());
         //request.setExpires(new Date());

         SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
         assertNotNull(subscribeResponse);

         AddressingProperties responseProps = getResponseProperties((BindingProvider)eventSourcePort);
         assertEquals(EventingConstants.SUBSCRIBE_RESPONSE_ACTION, responseProps.getAction().getURI().toString());
View Full Code Here

Examples of org.jboss.ws.extensions.eventing.jaxws.SubscribeResponse

         request.setDelivery(delivery);
         request.setEndTo(delivery.getNotifyTo());
         request.setFilter(getDefaultFilter());
         //request.setExpires(new Date());

         SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
         assertNotNull(subscribeResponse);

         AddressingProperties responseProps = getResponseProperties((BindingProvider)eventSourcePort);
         assertEquals(EventingConstants.SUBSCRIBE_RESPONSE_ACTION, responseProps.getAction().getURI().toString());
View Full Code Here

Examples of org.jboss.ws.extensions.eventing.jaxws.SubscribeResponse

      request.setExpires(new Date(System.currentTimeMillis() - 1000 * 60 * 60)); // invalid lease time
      request.setFilter(getDefaultFilter());

      try
      {
         SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
        fail("Subscription should fail due to invalid lease time");
      }
      catch (Exception e)
      {
         // ignore expected exception
View Full Code Here

Examples of org.jboss.ws.extensions.eventing.jaxws.SubscribeResponse

      request.setExpires(new Date(System.currentTimeMillis() + EventingConstants.MAX_LEASE_TIME + 1000));
      request.setFilter(getDefaultFilter());

      try
      {
         SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
         fail("Subscription should fail due to exceedd max lease time");
      }
      catch (Exception e)
      {
         // ignore expected exception
View Full Code Here

Examples of org.jboss.ws.extensions.eventing.jaxws.SubscribeResponse

      //
      // To update the expiration for a subscription,
      // subscription managers MUST support requests to renew subscriptions.
      //
      SubscribeResponse response = doSubscribe();

      AddressingProperties requestProps =
            buildFollowupProperties(response, EventingConstants.RENEW_ACTION, eventSourceURI.toString());
      setRequestProperties((BindingProvider)managerPort, requestProps);

      Date oldLeaseTime = response.getExpires();
      Renew renewRequest = new Renew();
      RenewResponse renewResponse = managerPort.renewOp(renewRequest);
      assertNotNull(renewResponse);
      assertNotNull(renewResponse.getExpires());
      AddressingProperties responseProps = getResponseProperties((BindingProvider)managerPort);
View Full Code Here

Examples of org.jboss.ws.extensions.eventing.jaxws.SubscribeResponse

   {
      //
      // If the subscription is valid and has not expired,
      // the subscription manager MUST reply with the actual lease time.
      //
      SubscribeResponse response = doSubscribe();

      AddressingProperties requestProps =
            buildFollowupProperties(response, EventingConstants.GET_STATUS_ACTION, eventSourceURI.toString());
      setRequestProperties((BindingProvider)managerPort, requestProps);

      Date expectedLeaseTime = response.getExpires();
      GetStatusResponse statusResponse = managerPort.getStatusOp(new GetStatus());

      assertNotNull(statusResponse);
      assertNotNull(statusResponse.getExpires());
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.