|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.root1.simon.ClientToServerConnection
public class ClientToServerConnection
This class is used to store the relation between:
Dispatcher
IoSession
IoConnector
ExecutorService
used on the filter chainSimon
to establish only one connection to a server for
several Simon.lookup(java.lang.String, int, java.lang.String)
calls. Each lookup on the same connection increases a reference count.
The connection will be dropped by SIMON if the reference count reaches 0.
Constructor Summary | |
---|---|
protected |
ClientToServerConnection(java.lang.String serverString,
Dispatcher dispatcher,
org.apache.mina.core.session.IoSession session,
org.apache.mina.core.service.IoConnector connector,
java.util.concurrent.ExecutorService filterchainWorkerPool)
Creates a new Instance of ClientToServerConnection |
Method Summary | |
---|---|
protected int |
addRef()
Increases the reference count by one |
protected int |
delRef()
Decreases the reference count by one |
protected org.apache.mina.core.service.IoConnector |
getConnector()
Returns the IoConnector related to the connection |
protected Dispatcher |
getDispatcher()
Gets the Dispatcher the client uses to communicate with the network |
protected java.util.concurrent.ExecutorService |
getFilterchainWorkerPool()
|
protected int |
getRefCount()
Returns the current valid reference count |
protected java.lang.String |
getServerString()
Gets the server string |
protected org.apache.mina.core.session.IoSession |
getSession()
Gets the session which is used by the client to communicate with the server via Dispatcher |
protected void |
setConnector(org.apache.mina.transport.socket.nio.NioSocketConnector connector)
Sets the socket connector used by SIMON to connect to server |
protected void |
setDispatcher(Dispatcher dispatcher)
Sets the Dispatcher the client uses to communicate with the network |
protected void |
setFilterchainWorkerPool(java.util.concurrent.ExecutorService filterchainWorkerPool)
|
protected void |
setServerString(java.lang.String serverString)
Sets the server string |
protected void |
setSession(org.apache.mina.core.session.IoSession session)
Sets the session which is used by the client to communicate with the server via Dispatcher |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ClientToServerConnection(java.lang.String serverString, Dispatcher dispatcher, org.apache.mina.core.session.IoSession session, org.apache.mina.core.service.IoConnector connector, java.util.concurrent.ExecutorService filterchainWorkerPool)
ClientToServerConnection
serverString
- the used server stringdispatcher
- the used dispatchersession
- connector
- filterchainWorkerPool
- Method Detail |
---|
protected org.apache.mina.core.service.IoConnector getConnector()
IoConnector
related to the connection
IoConnector
protected void setConnector(org.apache.mina.transport.socket.nio.NioSocketConnector connector)
connector
- protected java.util.concurrent.ExecutorService getFilterchainWorkerPool()
protected void setFilterchainWorkerPool(java.util.concurrent.ExecutorService filterchainWorkerPool)
protected int addRef()
protected int delRef()
protected int getRefCount()
protected Dispatcher getDispatcher()
Dispatcher
the client uses to communicate with the network
protected void setDispatcher(Dispatcher dispatcher)
Dispatcher
the client uses to communicate with the network
dispatcher
- the dispatcher to storeprotected org.apache.mina.core.session.IoSession getSession()
Dispatcher
protected void setSession(org.apache.mina.core.session.IoSession session)
Dispatcher
session
- the session to storeprotected java.lang.String getServerString()
protected void setServerString(java.lang.String serverString)
serverString
- the server string to store
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |