public class JConnectionMgr.Connection extends Object implements IpConnection
Modifier | Constructor and Description |
---|---|
protected |
JConnectionMgr.Connection(IpConnection delegate)
Builds a new connection.
|
Modifier and Type | Method and Description |
---|---|
void |
acquire()
Returns when the socket is acquired.
|
int |
available() |
void |
delete()
Deletes this connection, removing it from the connection manager, and
closing the socket.
|
void |
emit(Chunk chunk) |
String |
getHostName()
Returns the host name of the underlying socket.
|
int |
getPort()
Returns the port number of the underlying socket.
|
IpSession |
getSession()
Returns the session attached to this connection.
|
int |
hashCode() |
void |
receive(Chunk chunk,
int to_read) |
void |
release()
Releases this connection.
|
void |
setSession(IpSession session)
Attaches a new session to this connection.
|
String |
toString() |
protected JConnectionMgr.Connection(IpConnection delegate) throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
public int available() throws IOException
available
in interface IpConnection
IOException
public void receive(Chunk chunk, int to_read) throws IOException
receive
in interface IpConnection
IOException
public void emit(Chunk chunk) throws IOException
emit
in interface IpConnection
IOException
public int getPort()
getPort
in interface IpConnection
public String getHostName()
getHostName
in interface IpConnection
public IpSession getSession()
getSession
in interface IpConnection
public void setSession(IpSession session)
setSession
in interface IpConnection
session
- the session to be attached to the target connection.public void delete()
delete
in interface IpConnection
public void acquire()
public void release()
release
in interface IpConnection