Examples of onCommand()


Examples of org.apache.activemq.transport.TransportListener.onCommand()

        final TransportListener tl=peer.transportListener;
        prePeerSetQueue=peer.prePeerSetQueue;
        if(tl==null){
            prePeerSetQueue.add(command);
        }else{
            tl.onCommand(command);
        }
    }
   
    protected void asyncOneWay(Object command) throws IOException{
        messageQueue=getMessageQueue();
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onCommand()

     */
    public boolean iterate(){
        final TransportListener tl=peer.transportListener;
        if(!messageQueue.isEmpty()&&!peer.disposed&&tl!=null){
            final Command command=(Command) messageQueue.poll();
            tl.onCommand(command);
        }
        return !messageQueue.isEmpty()&&!peer.disposed&&!(peer.transportListener==null);
    }

    /**
 
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onCommand()

    }

    public void sendToActiveMQ(Command command) {
        TransportListener l = transportListener;
        if (l!=null) {
            l.onCommand(command);
        }
    }

    public void sendToStomp(StompFrame command) throws IOException {
        if (trace) {
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onCommand()

                onConsumerControl((ConsumerControl) command);
            }
        }
        for (Iterator iter = transportListeners.iterator(); iter.hasNext();) {
            TransportListener listener = (TransportListener) iter.next();
            listener.onCommand(command);
        }
    }

    /**
     * Used for handling async exceptions
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onCommand()

            }

        }
        for (Iterator<TransportListener> iter = transportListeners.iterator(); iter.hasNext();) {
            TransportListener listener = iter.next();
            listener.onCommand(command);
        }
    }

    protected void onWireFormatInfo(WireFormatInfo info) {
        protocolVersion.set(info.getVersion());
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onCommand()

        final FailoverTransport failoverTransport = ((ActiveMQConnection) connection).getTransport().narrow(FailoverTransport.class);
        final TransportListener delegate = failoverTransport.getTransportListener();
        failoverTransport.setTransportListener(new TransportListener() {
            @Override
            public void onCommand(Object command) {
                delegate.onCommand(command);
            }

            @Override
            public void onException(IOException error) {
                delegate.onException(error);
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onCommand()

            }

        }
        for (Iterator<TransportListener> iter = transportListeners.iterator(); iter.hasNext();) {
            TransportListener listener = iter.next();
            listener.onCommand(command);
        }
    }

    protected void onWireFormatInfo(WireFormatInfo info) {
        protocolVersion.set(info.getVersion());
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onCommand()

        if( transportListener!=null ) {
            if( command == DISCONNECT ) {
                transportListener.onException(new TransportDisposedIOException("Peer (" + peer.toString() + ") disposed."));
            } else {
                transportListener.onCommand(command);
            }
        }
    }

    public void start() throws Exception {
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onCommand()

        Object command = mq.poll();
        if (command != null) {
            if( command == DISCONNECT ) {
                tl.onException(new TransportDisposedIOException("Peer (" + peer.toString() + ") disposed."));
            } else {
                tl.onCommand(command);
            }
            return !mq.isEmpty();
        } else {
            return false;
        }
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onCommand()

    }

    public void sendToActiveMQ(Command command) {
        TransportListener l = transportListener;
        if (l!=null) {
            l.onCommand(command);
        }
    }

    public void sendToStomp(StompFrame command) throws IOException {
        if (trace) {
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.