org.activemq.transport
Class TransportServerChannelSupport

java.lang.Object
  extended by org.activemq.transport.TransportServerChannelSupport
All Implemented Interfaces:
Service, TransportServerChannel
Direct Known Subclasses:
ActiveIOTransportServerChannel, MulticastTransportServerChannel, TcpTransportServerChannel, UdpTransportServerChannel, VmTransportServerChannel

public abstract class TransportServerChannelSupport
extends Object
implements TransportServerChannel

An abstract base class useful for implementation inheritance

Version:
$Revision: 1.1.1.1 $

Constructor Summary
TransportServerChannelSupport(String url)
           
TransportServerChannelSupport(URI url)
           
 
Method Summary
 void addClient(TransportChannel channel)
          Add a channel
 InetSocketAddress getSocketAddress()
          An optional method to return the socket address if there is one on which this channel is listening.
 TransportChannelListener getTransportChannelListener()
           
 String getUrl()
          Returns the URL to connect to this connector
 void removeClient(TransportChannel channel)
          remove a channel
protected  String resolveHostName(String hostName)
           
 void setTransportChannelListener(TransportChannelListener listener)
          Registers the listener to be used when new clients connect or disconnect
 void setUrl(String url)
           
 void start()
          Called to start the service
 void stop()
          Called to shutdown the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportServerChannelSupport

public TransportServerChannelSupport(URI url)

TransportServerChannelSupport

public TransportServerChannelSupport(String url)
Method Detail

start

public void start()
           throws JMSException
Description copied from interface: Service
Called to start the service

Specified by:
start in interface Service
Specified by:
start in interface TransportServerChannel
Throws:
JMSException - if an error occurs

stop

public void stop()
          throws JMSException
Description copied from interface: Service
Called to shutdown the service

Specified by:
stop in interface Service
Specified by:
stop in interface TransportServerChannel
Throws:
JMSException

getTransportChannelListener

public TransportChannelListener getTransportChannelListener()

setTransportChannelListener

public void setTransportChannelListener(TransportChannelListener listener)
Description copied from interface: TransportServerChannel
Registers the listener to be used when new clients connect or disconnect

Specified by:
setTransportChannelListener in interface TransportServerChannel
Parameters:
listener - the listener to be invoked when a client connects or disconnects

getUrl

public String getUrl()
Description copied from interface: TransportServerChannel
Returns the URL to connect to this connector

Specified by:
getUrl in interface TransportServerChannel

setUrl

public void setUrl(String url)

getSocketAddress

public InetSocketAddress getSocketAddress()
Description copied from interface: TransportServerChannel
An optional method to return the socket address if there is one on which this channel is listening. An implementation may return null for this operation; its mostly intended to be used for tooling to be able to access socket address information.

Specified by:
getSocketAddress in interface TransportServerChannel
Returns:

addClient

public void addClient(TransportChannel channel)
Add a channel

Parameters:
channel -

removeClient

public void removeClient(TransportChannel channel)
remove a channel

Parameters:
channel -

resolveHostName

protected String resolveHostName(String hostName)


Copyright © 2004-2010 Protique, Ltd.. All Rights Reserved.