org.apache.activemq.transport.vm
Class VMTransportServer

java.lang.Object
  extended by org.apache.activemq.transport.vm.VMTransportServer
All Implemented Interfaces:
Service, TransportServer

public class VMTransportServer
extends Object
implements TransportServer

Broker side of the VMTransport


Constructor Summary
VMTransportServer(URI location, boolean disposeOnDisconnect)
           
 
Method Summary
static Transport configure(Transport transport)
          Configure transport
 VMTransport connect()
           
 URI getBindURI()
           
 int getConnectionCount()
           
 URI getConnectURI()
           
 InetSocketAddress getSocketAddress()
           
 void setAcceptListener(TransportAcceptListener acceptListener)
          Set the Transport accept listener for new Connections
 void setBrokerInfo(BrokerInfo brokerInfo)
          Associates a broker info with the transport server so that the transport can do discovery advertisements of the broker.
 void start()
           
 void stop()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VMTransportServer

public VMTransportServer(URI location,
                         boolean disposeOnDisconnect)
Parameters:
location -
disposeOnDisconnect -
Method Detail

toString

public String toString()
Overrides:
toString in class Object
Returns:
a pretty print of this

connect

public VMTransport connect()
                    throws IOException
Returns:
new VMTransport
Throws:
IOException

configure

public static Transport configure(Transport transport)
Configure transport

Parameters:
transport -
Returns:
the Transport

setAcceptListener

public void setAcceptListener(TransportAcceptListener acceptListener)
Set the Transport accept listener for new Connections

Specified by:
setAcceptListener in interface TransportServer
Parameters:
acceptListener -

start

public void start()
           throws IOException
Specified by:
start in interface Service
Throws:
IOException

stop

public void stop()
          throws IOException
Specified by:
stop in interface Service
Throws:
IOException

getConnectURI

public URI getConnectURI()
Specified by:
getConnectURI in interface TransportServer

getBindURI

public URI getBindURI()

setBrokerInfo

public void setBrokerInfo(BrokerInfo brokerInfo)
Description copied from interface: TransportServer
Associates a broker info with the transport server so that the transport can do discovery advertisements of the broker.

Specified by:
setBrokerInfo in interface TransportServer

getSocketAddress

public InetSocketAddress getSocketAddress()
Specified by:
getSocketAddress in interface TransportServer
Returns:
The socket address that this transport is accepting connections on or null if this does not or is not currently accepting connections on a socket.

getConnectionCount

public int getConnectionCount()


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.