Package org.apache.activemq.command

Examples of org.apache.activemq.command.Endpoint


        bufferPool.stop();
    }

    public Command read() throws IOException {
        Command answer = null;
        Endpoint from = null;
        synchronized (readLock) {
            while (true) {
                readBuffer.clear();
                SocketAddress address = channel.receive(readBuffer);
View Full Code Here


    public void stop() throws Exception {
    }

    public Command read() throws IOException {
        Command answer = null;
        Endpoint from = null;
        synchronized (readLock) {
            while (true) {
                DatagramPacket datagram = createDatagramPacket();
                channel.receive(datagram);
View Full Code Here

            BrokerInfo remoteBrokerInfo = (BrokerInfo)command;
            BrokerId remoteBrokerId = remoteBrokerInfo.getBrokerId();

            // lets associate the incoming endpoint with a broker ID so we can
            // refer to it later
            Endpoint from = command.getFrom();
            if (from == null) {
                LOG.warn("Incoming command does not have a from endpoint: " + command);
            } else {
                from.setBrokerInfo(remoteBrokerInfo);
            }
            if (localBrokerId != null) {
                if (localBrokerId.equals(remoteBrokerId)) {
                    LOG.info("Disconnecting loop back connection.");
                    // waitStarted();
View Full Code Here

    /**
     * Returns the broker ID that the command came from
     */
    protected BrokerId getFromBrokerId(Command command) throws IOException {
        BrokerId answer = null;
        Endpoint from = command.getFrom();
        if (from == null) {
            LOG.warn("Incoming command does not have a from endpoint: " + command);
        } else {
            answer = from.getBrokerId();
        }
        if (answer != null) {
            return answer;
        } else {
            throw new IOException("No broker ID is available for endpoint: " + from + " from command: "
View Full Code Here

            BrokerInfo remoteBrokerInfo = (BrokerInfo)command;
            BrokerId remoteBrokerId = remoteBrokerInfo.getBrokerId();

            // lets associate the incoming endpoint with a broker ID so we can
            // refer to it later
            Endpoint from = command.getFrom();
            if (from == null) {
                LOG.warn("Incoming command does not have a from endpoint: " + command);
            } else {
                from.setBrokerInfo(remoteBrokerInfo);
            }
            if (localBrokerId != null) {
                if (localBrokerId.equals(remoteBrokerId)) {
                    LOG.info("Disconnecting loop back connection.");
                    // waitStarted();
View Full Code Here

    /**
     * Returns the broker ID that the command came from
     */
    protected BrokerId getFromBrokerId(Command command) throws IOException {
        BrokerId answer = null;
        Endpoint from = command.getFrom();
        if (from == null) {
            LOG.warn("Incoming command does not have a from endpoint: " + command);
        } else {
            answer = from.getBrokerId();
        }
        if (answer != null) {
            return answer;
        } else {
            throw new IOException("No broker ID is available for endpoint: " + from + " from command: "
View Full Code Here

        bufferPool.stop();
    }

    public Command read() throws IOException {
        Command answer = null;
        Endpoint from = null;
        synchronized (readLock) {
            while (true) {
                readBuffer.clear();
                SocketAddress address = channel.receive(readBuffer);
View Full Code Here

    }

    public void onCommand(Object o) {
      final Command command = (Command) o;
        // redirect to the endpoint that the last response came from
        Endpoint from = command.getFrom();
        transport.setTargetEndpoint(from);
   
        super.onCommand(command);
    }
View Full Code Here

        synchronized (brokerInfoMutex) {
            BrokerInfo remoteBrokerInfo = (BrokerInfo) command;
            BrokerId remoteBrokerId = remoteBrokerInfo.getBrokerId();
           
            // lets associate the incoming endpoint with a broker ID so we can refer to it later
            Endpoint from = command.getFrom();
            if (from == null) {
                log.warn("Incoming command does not have a from endpoint: " + command);
            }
            else {
                from.setBrokerInfo(remoteBrokerInfo);
            }
            if (localBrokerId != null) {
                if (localBrokerId.equals(remoteBrokerId)) {
                    log.info("Disconnecting loop back connection.");
                    // waitStarted();
View Full Code Here

    /**
     * Returns the broker ID that the command came from
     */
    protected BrokerId getFromBrokerId(Command command) throws IOException {
        BrokerId answer = null;
        Endpoint from = command.getFrom();
        if (from == null) {
            log.warn("Incoming command does not have a from endpoint: " + command);
        }
        else {
            answer = from.getBrokerId();
        }
        if (answer != null) {
            return answer;
        }
        else {
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.Endpoint

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.