org.apache.activemq.transport
Class TransportServerThreadSupport

java.lang.Object
  extended by org.apache.activemq.util.ServiceSupport
      extended by org.apache.activemq.transport.TransportServerSupport
          extended by org.apache.activemq.transport.TransportServerThreadSupport
All Implemented Interfaces:
Runnable, Service, TransportServer
Direct Known Subclasses:
TcpTransportServer

public abstract class TransportServerThreadSupport
extends TransportServerSupport
implements Runnable

A useful base class for implementations of TransportServer which uses a background thread to accept new connections.


Field Summary
 
Fields inherited from class org.apache.activemq.transport.TransportServerSupport
transportOptions
 
Constructor Summary
TransportServerThreadSupport()
           
TransportServerThreadSupport(URI location)
           
 
Method Summary
protected  void doStart()
           
protected  void doStop(ServiceStopper stopper)
           
 long getStackSize()
           
 boolean isDaemon()
           
 boolean isJoinOnStop()
           
 void setDaemon(boolean daemon)
          Sets whether the background read thread is a daemon thread or not
 void setJoinOnStop(boolean joinOnStop)
          Sets whether the background read thread is joined with (waited for) on a stop
 void setStackSize(long stackSize)
           
 
Methods inherited from class org.apache.activemq.transport.TransportServerSupport
getAcceptListener, getBindLocation, getConnectURI, onAcceptError, setAcceptListener, setBindLocation, setConnectURI, setTransportOption
 
Methods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 
Methods inherited from interface org.apache.activemq.transport.TransportServer
getSocketAddress, isSslServer, setBrokerInfo
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Constructor Detail

TransportServerThreadSupport

public TransportServerThreadSupport()

TransportServerThreadSupport

public TransportServerThreadSupport(URI location)
Method Detail

isDaemon

public boolean isDaemon()

setDaemon

public void setDaemon(boolean daemon)
Sets whether the background read thread is a daemon thread or not


isJoinOnStop

public boolean isJoinOnStop()

setJoinOnStop

public void setJoinOnStop(boolean joinOnStop)
Sets whether the background read thread is joined with (waited for) on a stop


doStart

protected void doStart()
                throws Exception
Specified by:
doStart in class ServiceSupport
Throws:
Exception

doStop

protected void doStop(ServiceStopper stopper)
               throws Exception
Specified by:
doStop in class ServiceSupport
Throws:
Exception

getStackSize

public long getStackSize()
Returns:
the stackSize

setStackSize

public void setStackSize(long stackSize)
Parameters:
stackSize - the stackSize to set


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