org.caleigo.toolkit.tunnel
Class SocketTunnelServer

java.lang.Object
  extended byorg.caleigo.toolkit.tunnel.AbstractTunnelServer
      extended byorg.caleigo.toolkit.tunnel.SocketTunnelServer
All Implemented Interfaces:
ITunnelListener, ITunnelServer

public class SocketTunnelServer
extends AbstractTunnelServer

Version:
1.00
Author:
Mattias Hagstrand

Nested Class Summary
protected  class SocketTunnelServer.ConnectionListener
           
 
Field Summary
protected  SocketTunnelServer.ConnectionListener mConnectionListener
           
protected  boolean mIsInitialized
           
protected  int mPort
           
protected  java.net.ServerSocket mServerSocket
           
 
Fields inherited from class org.caleigo.toolkit.tunnel.AbstractTunnelServer
mMessageConsumers, mRegisteredCodecs, mRegisteredPackers, mTunnels, mTunnelServerListeners
 
Constructor Summary
SocketTunnelServer(int port)
           
 
Method Summary
 void finalize()
          Performs cleanup for this ITunnelServer.
 void initialize()
          Initializes the ITunnelServer.
 
Methods inherited from class org.caleigo.toolkit.tunnel.AbstractTunnelServer
addMessageConsumer, addTunnel, addTunnelServerListener, connectionLost, fireTunnelAddedEvent, fireTunnelRemovedEvent, getCodec, getPacker, getTunnel, getTunnelCount, getTunnels, registerCodec, registerPacker, removeMessageConsumer, removeTunnel, removeTunnelServerListener, setUpTunnel, tunnelClosed
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mPort

protected int mPort

mServerSocket

protected java.net.ServerSocket mServerSocket

mIsInitialized

protected boolean mIsInitialized

mConnectionListener

protected SocketTunnelServer.ConnectionListener mConnectionListener
Constructor Detail

SocketTunnelServer

public SocketTunnelServer(int port)
Method Detail

initialize

public void initialize()
                throws java.lang.IllegalStateException,
                       TunnelException
Description copied from class: AbstractTunnelServer
Initializes the ITunnelServer. This method must be called before connections can be accepted.

Specified by:
initialize in interface ITunnelServer
Overrides:
initialize in class AbstractTunnelServer
Throws:
java.lang.IllegalStateException
TunnelException

finalize

public void finalize()
              throws java.lang.IllegalStateException,
                     TunnelException
Description copied from class: AbstractTunnelServer
Performs cleanup for this ITunnelServer. This involves closing all connections. No connections can be accepted after this method has been called.

Specified by:
finalize in interface ITunnelServer
Overrides:
finalize in class AbstractTunnelServer
Throws:
java.lang.IllegalStateException
TunnelException


Copyright © 2005 Caleigo. All Rights Reserved.