|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.mom.proxies.tcp.TcpConnection
public class TcpConnection
Handles the TCP connection. Starts the reader and writer threads responsible for
reading the requests and writing the replies.
Calls the UserConnection
in order to invoke the user's proxy and get
its replies.
TcpProxyService
,
TcpConnectionListener
Field Summary | |
---|---|
private boolean |
closeConnection
|
private java.util.Date |
creationDate
|
private ReliableConnectionContext |
ctx
|
private Identity |
identity
|
private IOControl |
ioctrl
|
static org.objectweb.util.monolog.api.Logger |
logger
logger |
private AgentId |
proxyId
|
private TcpProxyService |
proxyService
The TCP proxy service used to register and unregister this connection. |
private TcpReader |
tcpReader
The reader thread responsible for reading the requests (input). |
private TcpWriter |
tcpWriter
The writer thread responsible for writing the replies (output). |
Constructor Summary | |
---|---|
TcpConnection(IOControl ioctrl,
ReliableConnectionContext ctx,
AgentId proxyId,
TcpProxyService proxyService,
Identity identity)
Creates a new TCP connection. |
Method Summary | |
---|---|
void |
close()
Stops the connection reader and writer threads. |
java.lang.String |
getAddress()
Gets the socket address used by the connection. |
java.util.Date |
getCreationDate()
Gets connection creation date. |
int |
getKey()
|
private java.lang.String |
getMBeanName()
|
AgentId |
getProxyId()
|
long |
getReceivedCount()
Gets the number of replies received on the connection. |
long |
getSentCount()
Gets the number of requests sent on the connection. |
java.lang.String |
getUserName()
Gets connected user's name. |
(package private) void |
start()
Starts the connection reader and writer threads. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static org.objectweb.util.monolog.api.Logger logger
private IOControl ioctrl
private AgentId proxyId
private ReliableConnectionContext ctx
private TcpReader tcpReader
private TcpWriter tcpWriter
private TcpProxyService proxyService
private boolean closeConnection
private Identity identity
private java.util.Date creationDate
Constructor Detail |
---|
public TcpConnection(IOControl ioctrl, ReliableConnectionContext ctx, AgentId proxyId, TcpProxyService proxyService, Identity identity)
ioctrl
- ctx
- proxyId
- proxyService
- the TCP proxy serviceidentity
- Method Detail |
---|
private java.lang.String getMBeanName()
public final AgentId getProxyId()
public final int getKey()
void start() throws java.lang.Exception
java.lang.Exception
public void close()
close
in interface TcpConnectionMBean
public java.lang.String getUserName()
TcpConnectionMBean
getUserName
in interface TcpConnectionMBean
public java.lang.String getAddress()
TcpConnectionMBean
getAddress
in interface TcpConnectionMBean
public java.util.Date getCreationDate()
TcpConnectionMBean
getCreationDate
in interface TcpConnectionMBean
public long getReceivedCount()
TcpConnectionMBean
getReceivedCount
in interface TcpConnectionMBean
public long getSentCount()
TcpConnectionMBean
getSentCount
in interface TcpConnectionMBean
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |