Package org.activemq.message

Examples of org.activemq.message.ConnectionInfo


        assertTrue(test.matchProducer(advisory, info));
    }
   
    public void testMatchConnection(){
       
        ConnectionInfo info = new ConnectionInfo();
       
       
        ActiveMQTopic advisoryDest = new ActiveMQTopic(ActiveMQDestination.CONNECTION_ADVISORY_PREFIX);
        ConsumerInfo advisory = new ConsumerInfo();
        advisory.setDestination(advisoryDest);
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

      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

                            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();
                dispatchToTarget(sender, generateAdvisory(advisory, info));
            }
            for (Iterator i = connections.iterator();i.hasNext();) {
                ConnectionInfo info = (ConnectionInfo) i.next();
                dispatchToTarget(sender, generateAdvisory(advisory, info));
            }
            for (Iterator i = tempDestinations.values().iterator();i.hasNext();) {
                Set set = (Set) i.next();
                for (Iterator si = set.iterator();si.hasNext();) {
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

            for (Iterator i = producers.iterator();i.hasNext();) {
                ProducerInfo info = (ProducerInfo) i.next();
                dispatchToTarget(sender, generateAdvisory(advisory, info));
            }
            for (Iterator i = connections.iterator();i.hasNext();) {
                ConnectionInfo info = (ConnectionInfo) i.next();
                dispatchToTarget(sender, generateAdvisory(advisory, info));
            }
            for (Iterator i = tempDestinations.values().iterator();i.hasNext();) {
                Set set = (Set) i.next();
                for (Iterator si = set.iterator();si.hasNext();) {
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

     * @param msg
     */
    public void onMessage(Message msg) {
        if (msg instanceof ObjectMessage) {
            try {
                ConnectionInfo info = (ConnectionInfo) ((ObjectMessage) msg).getObject();
               
                ConnectionAdvisoryEvent event = new ConnectionAdvisoryEvent(info);
                if (!event.getInfo().isClosed()) {
                    activeConnections.put(event.getInfo().getClientId(), event.getInfo());
                }
View Full Code Here

    }

    // Implementation methods
    //-------------------------------------------------------------------------
    protected Packet createConnectionInfo() {
        connectionInfo = new ConnectionInfo();
        connectionInfo.setStarted(true);
        connectionInfo.setClientId(this.clientID);
        connectionInfo.setClientVersion("" + getCurrentWireFormatVersion());
        connectionInfo.setUserName(userName);
        return connectionInfo;
View Full Code Here

TOP

Related Classes of org.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.