Package org.apache.activemq.transport

Examples of org.apache.activemq.transport.TransportListener


    public ConnectionPool(ActiveMQConnection connection, ObjectPoolFactory poolFactory) {
        this(connection, new HashMap(), poolFactory);
        // Add a transport Listener so that we can notice if this connection should be expired due to
        // a connection failure.
        connection.addTransportListener(new TransportListener(){
      public void onCommand(Object command) {
      }
      public void onException(IOException error) {
        synchronized(ConnectionPool.this) {
          hasFailed = true;
View Full Code Here


            onException(IOExceptionSupport.create(e));
        }
    }

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

            }else if (command instanceof ConsumerControl){
                onConsumerControl((ConsumerControl) command);
            }
        }
        for (Iterator iter = transportListeners.iterator(); iter.hasNext();) {
            TransportListener listener = (TransportListener) iter.next();
            listener.onCommand(command);
        }
    }
View Full Code Here

                transportFailed(error);
                ServiceSupport.dispose(ActiveMQConnection.this.transport);
                brokerInfoReceived.countDown();
       
                for (Iterator iter = transportListeners.iterator(); iter.hasNext();) {
                    TransportListener listener = (TransportListener) iter.next();
                    listener.onException(error);
                }
            }
        });
    }
View Full Code Here

        for (Iterator i = this.sessions.iterator(); i.hasNext();) {
            ActiveMQSession s = (ActiveMQSession) i.next();
            s.clearMessagesInProgress();
        }
        for (Iterator iter = transportListeners.iterator(); iter.hasNext();) {
            TransportListener listener = (TransportListener) iter.next();
            listener.transportInterupted();
        }
    }
View Full Code Here

        }
    }

    public void transportResumed() {
        for (Iterator iter = transportListeners.iterator(); iter.hasNext();) {
            TransportListener listener = (TransportListener) iter.next();
            listener.transportResumed();
        }
        for (Iterator i = this.sessions.iterator(); i.hasNext();) {
            ActiveMQSession s = (ActiveMQSession) i.next();
            s.deliverAcks();
        }
View Full Code Here

    public ConnectionPool(ActiveMQConnection connection, ObjectPoolFactory poolFactory) {
        this(connection, new HashMap<SessionKey, SessionPool>(), poolFactory);
        // Add a transport Listener so that we can notice if this connection
        // should be expired due to
        // a connection failure.
        connection.addTransportListener(new TransportListener() {
            public void onCommand(Object command) {
            }

            public void onException(IOException error) {
                synchronized (ConnectionPool.this) {
View Full Code Here

                onClientInternalException(e);
            }

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

          } catch (JMSException e) {
            LOG.warn("Exception during connection cleanup, " + e, e);
          }
          for (Iterator<TransportListener> iter = transportListeners
              .iterator(); iter.hasNext();) {
            TransportListener listener = iter.next();
            listener.onException(error);
          }
        }
      });
    }
  }
View Full Code Here

        for (ActiveMQConnectionConsumer connectionConsumer : this.connectionConsumers) {
            connectionConsumer.clearMessagesInProgress();   
        }
       
        for (Iterator<TransportListener> iter = transportListeners.iterator(); iter.hasNext();) {
            TransportListener listener = iter.next();
            listener.transportInterupted();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.transport.TransportListener

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.