Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ConnectionInfo


        if (!isConnectionInfoSentToBroker) {
            transportChannel.setClientID(clientID);
        }
        this.isConnectionInfoSentToBroker = true;
        ensureClientIDInitialised();
        ConnectionInfo info = new ConnectionInfo();
        info.setClientId(this.clientID);
        info.setHostName(IdGenerator.getHostName());
        info.setUserName(userName);
        info.setPassword(password);
        info.setId(packetIdGenerator.generateId());
        info.setStartTime(startTime);
        info.setStarted(started.get());
        info.setClosed(isClosed);
        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

                            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

     * @throws IOException thrown if an error occurs
     */

    public void writePacket(Packet packet, DataOutput dataOut) throws IOException {
        super.writePacket(packet, dataOut);
        ConnectionInfo info = (ConnectionInfo) packet;
        super.writeUTF(info.getClientId(), dataOut);
        super.writeUTF(info.getUserName(), dataOut);
        super.writeUTF(info.getPassword(), dataOut);
        super.writeUTF(info.getHostName(), dataOut);
        super.writeUTF(info.getClientVersion(), dataOut);
        dataOut.writeInt(info.getWireFormatVersion());
        dataOut.writeLong(info.getStartTime());
        dataOut.writeBoolean(info.isStarted());
        dataOut.writeBoolean(info.isClosed());
        super.writeObject(info.getProperties(), dataOut);

    }
View Full Code Here

    /**
     * @return a new Packet instance
     */

    public Packet createPacket() {
        return new ConnectionInfo();
    }
View Full Code Here

     * @throws IOException
     */

    public void buildPacket(Packet packet, DataInput dataIn) throws IOException {
        super.buildPacket(packet, dataIn);
        ConnectionInfo info = (ConnectionInfo) packet;
        info.setClientId(dataIn.readUTF());
        info.setUserName(dataIn.readUTF());
        info.setPassword(dataIn.readUTF());
        info.setHostName(dataIn.readUTF());
        info.setClientVersion(dataIn.readUTF());
        info.setWireFormatVersion(dataIn.readInt());
        info.setStartTime(dataIn.readLong());
        info.setStarted(dataIn.readBoolean());
        info.setClosed(dataIn.readBoolean());
        info.setProperties((Properties) super.readObject(dataIn));
    }
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.setId(packetIdGenerator.generateId());
        info.setStartTime(startTime);
        info.setStarted(started.get());
        info.setClosed(closed.get());
        info.setClientVersion(connectionMetaData.getProviderVersion());
        info.setWireFormatVersion(transportChannel.getCurrentWireFormatVersion());
        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

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.