Examples of Subscribe


Examples of org.apache.tuscany.sca.binding.notification.encoding.Subscribe

    public void handle(Map<String, String> headers, ServletInputStream istream, int contentLength, ServletOutputStream ostream) {

        try {
            EncodingObject eo = EncodingUtils.decodeFromStream(encodingRegistry, istream);
            if (eo instanceof Subscribe) {
                Subscribe sub = (Subscribe)eo;
                invoker.addSubscriber(sub.getConsumerReference().getReference());
            }
            else if (eo instanceof ConnectionOverride) {
                ConnectionOverride co = (ConnectionOverride)eo;
                invoker.replaceSubscribers(co.getBrokerConsumerReference().getReference());
            }
View Full Code Here

Examples of org.apache.tuscany.sca.binding.notification.encoding.Subscribe

                crp.addProperty(cbi);
                epr.setReferenceProperties(crp);
            }
            ConsumerReference cr = new ConsumerReference();
            cr.setReference(epr);
            sub = new Subscribe();
            sub.setConsumerReference(cr);
        }
View Full Code Here

Examples of org.apache.tuscany.sca.binding.notification.encoding.Subscribe

    public void handle(Map<String, String> headers, ServletInputStream istream, int contentLength, ServletOutputStream ostream) {

        try {
            EncodingObject eo = EncodingUtils.decodeFromStream(encodingRegistry, istream);
            if (eo instanceof Subscribe) {
                Subscribe sub = (Subscribe)eo;
                addSubscriber(sub.getConsumerReference().getReference());
            }
            else if (eo instanceof ConnectionOverride) {
                ConnectionOverride co = (ConnectionOverride)eo;
                replaceSubscribers(co.getBrokerConsumerReference().getReference());
            }
View Full Code Here

Examples of org.atmosphere.annotation.Subscribe

            doSuspend(entity, req, resp, resource, config, topic, suspendTimeout, scope,
                    writeEntity, listeners, false, suspendAnnotation.resumeOnBroadcast(),
                    useResumeAnnotation);
        }
       
        Subscribe subscribeAnnotation = ctx.getActionAnnotation(Subscribe.class);
        if (subscribeAnnotation != null) {
           
            int timeout = subscribeAnnotation.timeout();
            Class<? extends AtmosphereResourceEventListener>[] listeners =
                    subscribeAnnotation.listeners();
            Suspend.SCOPE scope = Suspend.SCOPE.APPLICATION;
            String topic = subscribeAnnotation.value();
            boolean writeEntity = subscribeAnnotation.writeEntity();
           
            doSuspend(entity, req, resp, resource, config, topic, timeout, scope,
                    writeEntity, listeners, true, false, useResumeAnnotation);
        }
       
View Full Code Here

Examples of org.fusesource.mqtt.codec.SUBSCRIBE

                LOG.debug("MQTT Client " + getClientId() + " disconnecting");
                stopTransport();
                break;
            }
            case SUBSCRIBE.TYPE: {
                onSubscribe(new SUBSCRIBE().decode(frame));
                break;
            }
            case UNSUBSCRIBE.TYPE: {
                onUnSubscribe(new UNSUBSCRIBE().decode(frame));
                break;
View Full Code Here

Examples of org.fusesource.mqtt.codec.SUBSCRIBE

                LOG.debug("MQTT Client " + getClientId() + " disconnecting");
                onMQTTDisconnect();
                break;
            }
            case SUBSCRIBE.TYPE: {
                onSubscribe(new SUBSCRIBE().decode(frame));
                break;
            }
            case UNSUBSCRIBE.TYPE: {
                onUnSubscribe(new UNSUBSCRIBE().decode(frame));
                break;
View Full Code Here

Examples of org.fusesource.mqtt.codec.SUBSCRIBE

                    if (!activeSubs.isEmpty()) {
                        ArrayList<Topic> topics = new ArrayList<Topic>(activeSubs.size());
                        for (Map.Entry<UTF8Buffer, QoS> entry : activeSubs.entrySet()) {
                            topics.add(new Topic(entry.getKey(), entry.getValue()));
                        }
                        send(new SUBSCRIBE().topics(topics.toArray(new Topic[topics.size()])), null);
                    }

                    // Replay any un-acked requests..
                    for (Map.Entry<Short, Request> entry : originalRequests.entrySet()) {
                        MQTTFrame frame = entry.getValue().frame;
View Full Code Here

Examples of org.fusesource.mqtt.codec.SUBSCRIBE

            return;
        }
        if( listener == DEFAULT_LISTENER ) {
            cb.onFailure(createListenerNotSetError());
        } else {
            send(new SUBSCRIBE().topics(topics), new ProxyCallback<byte[]>(cb){
                @Override
                public void onSuccess(byte[] value) {
                    for (Topic topic : topics) {
                        activeSubs.put(topic.name(), topic.qos());
                    }
View Full Code Here

Examples of org.globus.workspace.client.modes.Subscribe

        } else if (this.cliArgs.mode_shutdown_save) {
            this.setMode(new ShutdownSave(this.pr, this.cliArgs, this));
        } else if (this.cliArgs.mode_start) {
            this.setMode(new Start(this.pr, this.cliArgs, this));
        } else if (this.cliArgs.mode_subscribe) {
            this.setMode(new Subscribe(this.pr, this.cliArgs, this));
        } else if (this.cliArgs.mode_doneEnsemble) {
            this.setMode(new EnsembleDone(this.pr, this.cliArgs, this));
        } else if (this.cliArgs.mode_monitorEnsemble) {
            this.setMode(new EnsembleMonitor(this.pr, this.cliArgs, this));
        } else if (this.cliArgs.mode_monitorContext) {
View Full Code Here

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

         );
         requestProps.setMessageID(AddressingClientUtil.createMessageID());
         setRequestProperties((BindingProvider) eventSourcePort, requestProps);

         // subscription
         Subscribe request = new Subscribe();

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

         SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
         assertNotNull(subscribeResponse);
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.