|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.caleigo.toolkit.tunnel.AbstractTunnelServer
Field Summary | |
protected boolean |
mIsInitialized
|
protected java.util.List |
mMessageConsumers
|
protected java.util.Map |
mRegisteredCodecs
|
protected java.util.Map |
mRegisteredPackers
|
protected java.util.List |
mTunnels
|
protected java.util.List |
mTunnelServerListeners
|
Constructor Summary | |
AbstractTunnelServer()
|
Method Summary | |
void |
addMessageConsumer(IMessageConsumer consumer)
Adds the IMessageConsumer that receives messages from all connections that this ITunnelServer has set up. |
protected void |
addTunnel(ITunnel tunnel)
|
void |
addTunnelServerListener(ITunnelServerListener listener)
|
void |
connectionLost(TunnelEvent event)
Invoked on an ITunnel on the client side when the connection to the server has been lost. |
void |
finalize()
Performs cleanup for this ITunnelServer. |
protected void |
fireTunnelAddedEvent(ITunnel tunnel)
|
protected void |
fireTunnelRemovedEvent(ITunnel tunnel)
|
protected ITunnelCodec |
getCodec(java.lang.String codecClassName)
|
protected ITunnelPacker |
getPacker(java.lang.String packerClassName)
|
ITunnel |
getTunnel(int index)
Returns the ITunnel with the provided index. |
int |
getTunnelCount()
Returns the number of ITunnels that this ITunnelServer has created. |
java.util.Iterator |
getTunnels()
Returns an Iterator for all ITunnels that this ITunnelServer has created. |
void |
initialize()
Initializes the ITunnelServer. |
void |
registerCodec(java.lang.Class codec)
Registers an ITunnelCodec that can be used when setting up a connection. |
void |
registerPacker(java.lang.Class packer)
Registers an ITunnelPacker that can be used when setting up a connection. |
void |
removeMessageConsumer(IMessageConsumer consumer)
Removes the IMessageConsumer all connections that this ITunnelServer has set up. |
protected void |
removeTunnel(ITunnel tunnel)
|
void |
removeTunnelServerListener(ITunnelServerListener listener)
|
protected void |
setUpTunnel(java.lang.Object connectionMessage,
ITunnel tunnel)
Try to set up the provided ITunnel based on the information contined in the connection message. |
void |
tunnelClosed(TunnelEvent event)
Invoked when the ITunnel has been closed. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List mTunnels
protected java.util.List mMessageConsumers
protected java.util.Map mRegisteredCodecs
protected java.util.Map mRegisteredPackers
protected boolean mIsInitialized
protected java.util.List mTunnelServerListeners
Constructor Detail |
public AbstractTunnelServer()
Method Detail |
public void initialize() throws java.lang.IllegalStateException, TunnelException
initialize
in interface ITunnelServer
java.lang.IllegalStateException
TunnelException
public void finalize() throws java.lang.IllegalStateException, TunnelException
finalize
in interface ITunnelServer
java.lang.IllegalStateException
TunnelException
public void registerPacker(java.lang.Class packer)
registerPacker
in interface ITunnelServer
public void registerCodec(java.lang.Class codec)
registerCodec
in interface ITunnelServer
public void addMessageConsumer(IMessageConsumer consumer)
addMessageConsumer
in interface ITunnelServer
public void removeMessageConsumer(IMessageConsumer consumer)
removeMessageConsumer
in interface ITunnelServer
public ITunnel getTunnel(int index)
getTunnel
in interface ITunnelServer
public java.util.Iterator getTunnels()
getTunnels
in interface ITunnelServer
public int getTunnelCount()
getTunnelCount
in interface ITunnelServer
public void addTunnelServerListener(ITunnelServerListener listener)
addTunnelServerListener
in interface ITunnelServer
public void removeTunnelServerListener(ITunnelServerListener listener)
removeTunnelServerListener
in interface ITunnelServer
public void tunnelClosed(TunnelEvent event)
tunnelClosed
in interface ITunnelListener
public void connectionLost(TunnelEvent event)
connectionLost
in interface ITunnelListener
protected void addTunnel(ITunnel tunnel)
protected void removeTunnel(ITunnel tunnel)
protected ITunnelCodec getCodec(java.lang.String codecClassName)
protected ITunnelPacker getPacker(java.lang.String packerClassName)
protected void fireTunnelAddedEvent(ITunnel tunnel)
protected void fireTunnelRemovedEvent(ITunnel tunnel)
protected void setUpTunnel(java.lang.Object connectionMessage, ITunnel tunnel) throws TunnelException
TunnelException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |