org.codehaus.activemq.transport.tcp
Class TcpTransportServerChannel

java.lang.Object
  extended byorg.codehaus.activemq.transport.TransportServerChannelSupport
      extended byorg.codehaus.activemq.transport.tcp.TcpTransportServerChannel
All Implemented Interfaces:
java.lang.Runnable, Service, TransportServerChannel
Direct Known Subclasses:
JxtaTransportServerChannel

public class TcpTransportServerChannel
extends TransportServerChannelSupport
implements java.lang.Runnable

Binds to a well known port and listens for Sockets ...

Version:
$Revision: 1.17 $

Field Summary
protected  java.lang.String bindAddressURI
           
protected static int DEFEAULT_BACKLOG
           
 
Constructor Summary
TcpTransportServerChannel(WireFormat wireFormat, java.net.ServerSocket serverSocket)
           
TcpTransportServerChannel(WireFormat wireFormat, java.net.URI bindAddr)
          Default Constructor
 
Method Summary
protected  java.net.ServerSocket createServerSocket(java.net.URI bind)
          Factory method to create a new ServerSocket
 int getBacklog()
           
 int getMaxOutstandingMessages()
           
 boolean isUseAsyncSend()
           
 void run()
          pull Sockets from the ServerSocket
 void setBacklog(int backlog)
           
 void setMaxOutstandingMessages(int maxOutstandingMessages)
           
 void setUseAsyncSend(boolean useAsyncSend)
           
 void start()
          start listeneing for events
 void stop()
          close the ServerChannel
 java.lang.String toString()
           
 
Methods inherited from class org.codehaus.activemq.transport.TransportServerChannelSupport
addClient, setTransportChannelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFEAULT_BACKLOG

protected static final int DEFEAULT_BACKLOG
See Also:
Constant Field Values

bindAddressURI

protected java.lang.String bindAddressURI
Constructor Detail

TcpTransportServerChannel

public TcpTransportServerChannel(WireFormat wireFormat,
                                 java.net.URI bindAddr)
                          throws JMSException
Default Constructor

Parameters:
bindAddr -
Throws:
JMSException

TcpTransportServerChannel

public TcpTransportServerChannel(WireFormat wireFormat,
                                 java.net.ServerSocket serverSocket)
Method Detail

stop

public void stop()
close the ServerChannel

Specified by:
stop in interface TransportServerChannel
Overrides:
stop in class TransportServerChannelSupport

start

public void start()
           throws JMSException
start listeneing for events

Specified by:
start in interface TransportServerChannel
Overrides:
start in class TransportServerChannelSupport
Throws:
JMSException - if an error occurs

toString

public java.lang.String toString()
Returns:
pretty print of this

run

public void run()
pull Sockets from the ServerSocket

Specified by:
run in interface java.lang.Runnable

isUseAsyncSend

public boolean isUseAsyncSend()

setUseAsyncSend

public void setUseAsyncSend(boolean useAsyncSend)

getMaxOutstandingMessages

public int getMaxOutstandingMessages()

setMaxOutstandingMessages

public void setMaxOutstandingMessages(int maxOutstandingMessages)

getBacklog

public int getBacklog()

setBacklog

public void setBacklog(int backlog)

createServerSocket

protected java.net.ServerSocket createServerSocket(java.net.URI bind)
                                            throws java.net.UnknownHostException,
                                                   java.io.IOException
Factory method to create a new ServerSocket

Throws:
java.net.UnknownHostException
java.io.IOException


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