Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ConnectionInfo


                            SessionInfo info = (SessionInfo) packet;
                            consumeSessionInfo(info);
                            break;
                        }
                        case Packet.ACTIVEMQ_CONNECTION_INFO : {
                            ConnectionInfo info = (ConnectionInfo) packet;
                            consumeConnectionInfo(info);
                            break;
                        }
                        case Packet.DURABLE_UNSUBSCRIBE : {
                            DurableUnsubscribe ds = (DurableUnsubscribe) packet;
View Full Code Here


     * @param msg
     */
    public void onMessage(Message msg){
        if (msg instanceof ObjectMessage){
            try {
                ConnectionInfo info = (ConnectionInfo)((ObjectMessage)msg).getObject();
                ConnectionAdvisoryEvent event = new ConnectionAdvisoryEvent(info);
                fireEvent(event);
            }
            catch (JMSException e) {
                log.error("Failed to process message: " + msg);
View Full Code Here

            return;
        }
       
        this.isConnectionInfoSentToBroker = true;
        ensureClientIDInitialised();
        ConnectionInfo info = new ConnectionInfo();
        info.setClientId(this.clientID);
        info.setHostName(IdGenerator.getHostName());
        info.setUserName(userName);
        info.setPassword(password);
        info.setStartTime(startTime);
        info.setStarted(started.get());
        info.setClosed(closed || closing);
        info.setClientVersion(connectionMetaData.getProviderVersion());
        info.setWireFormatVersion(transportChannel.getCurrentWireFormatVersion());
        if (info.getProperties() != null){
            info.getProperties().setProperty(ConnectionInfo.NO_DELAY_PROPERTY,new Boolean(!useAsyncSend).toString());
        }
        if (quickClose && info.isClosed()){
            asyncSendPacket(info);
        }else {
            syncSendPacket(info, timeout);
        }
    }
View Full Code Here

        assertTrue(test.matchProducer(advisory, info));
    }
   
    public void testMatchConnection(){
        String destName = "foo.bar";
        ConnectionInfo info = new ConnectionInfo();
       
       
        ActiveMQTopic advisoryDest = new ActiveMQTopic(ActiveMQDestination.CONNECTION_ADVISORY_PREFIX + destName);
        ConsumerInfo advisory = new ConsumerInfo();
        advisory.setDestination(advisoryDest);
View Full Code Here

            return;
        }
       
        this.isConnectionInfoSentToBroker = true;
        ensureClientIDInitialised();
        ConnectionInfo info = new ConnectionInfo();
        info.setClientId(this.clientID);
        info.setHostName(IdGenerator.getHostName());
        info.setUserName(userName);
        info.setPassword(password);
        info.setStartTime(startTime);
        info.setStarted(started.get());
        info.setClosed(closed.get() || closing);
        info.setClientVersion(connectionMetaData.getProviderVersion());
        info.setWireFormatVersion(transportChannel.getCurrentWireFormatVersion());
        if (info.getProperties() != null){
            info.getProperties().setProperty(ConnectionInfo.NO_DELAY_PROPERTY,new Boolean(!useAsyncSend).toString());
        }
        if (quickClose && info.isClosed()){
            asyncSendPacket(info);
        }else {
            syncSendPacket(info, timeout);
        }
    }
View Full Code Here

            String brokerClientID = createMulticastClientID();
            channel.setClientID(brokerClientID);

            // lets spoof a consumer for topics which will replicate messages
            // over the multicast transport
            ConnectionInfo info = new ConnectionInfo();
            info.setHostName(IdGenerator.getHostName());
            info.setClientId(brokerClientID);
            info.setStarted(true);
            client.consumeConnectionInfo(info);

            ConsumerInfo consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQTopic(">"));
            consumerInfo.setNoLocal(true);
View Full Code Here

     * @param msg
     */
    public void onMessage(Message msg){
        if (msg instanceof ObjectMessage){
            try {
                ConnectionInfo info = (ConnectionInfo)((ObjectMessage)msg).getObject();
                ConnectionAdvisoryEvent event = new ConnectionAdvisoryEvent(info);
                fireEvent(event);
            }
            catch (JMSException e) {
                log.error("Failed to process message: " + msg);
View Full Code Here

       
    }

    public void onEvent(ConnectionAdvisoryEvent event) {
        System.out.println(event);
        ConnectionInfo info = event.getInfo();
        started.set(info.isStarted());
        synchronized(started){
            started.notify();
        }
       
    }
View Full Code Here

                            SessionInfo info = (SessionInfo) packet;
                            consumeSessionInfo(info);
                            break;
                        }
                        case Packet.ACTIVEMQ_CONNECTION_INFO : {
                            ConnectionInfo info = (ConnectionInfo) packet;
                            consumeConnectionInfo(info);
                            break;
                        }
                        case Packet.DURABLE_UNSUBSCRIBE : {
                            DurableUnsubscribe ds = (DurableUnsubscribe) packet;
View Full Code Here

            for (Iterator i = producers.iterator();i.hasNext();) {
                ProducerInfo info = (ProducerInfo) i.next();
                generateAdvisory(advisory, info);
            }
            for (Iterator i = connections.iterator();i.hasNext();) {
                ConnectionInfo info = (ConnectionInfo) i.next();
                generateAdvisory(advisory, info);
            }
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.message.ConnectionInfo

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.