|
Project JXTA | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.endpoint.tcp.TcpConnection
Low-level TcpMessenger
Constructor Summary | |
(package private) |
TcpConnection(EndpointAddress destaddr,
TcpTransport p)
Creates a new TcpConnection for the specified destination address. |
(package private) |
TcpConnection(Socket incSocket,
TcpTransport p)
Creates a new connection from an incoming socket |
Method Summary | |
void |
close()
Soft close of the connection. |
boolean |
equals(Object target)
|
protected void |
finalize()
|
EndpointAddress |
getConnectionAddress()
|
EndpointAddress |
getDestinationAddress()
|
ID |
getDestinationPeerID()
|
long |
getLastUsed()
Return the absolute time in milliseconds at which this Connection was last used. |
(package private) TransportBindingMeter |
getTransportBindingMeter()
|
int |
hashCode()
|
boolean |
isConnected()
return the current connection status. |
void |
run()
This is the background Thread. |
void |
sendMessage(Message msg)
Send message to the remote peer. |
protected void |
start()
|
String |
toString()
Implementation for debugging. |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
TcpConnection(EndpointAddress destaddr, TcpTransport p) throws IOException
destaddr
- the destination address of this connection.p
- the transport which this connection is part of.
IOException
- for failures in creating the connection.TcpConnection(Socket incSocket, TcpTransport p) throws IOException
incSocket
- the incoming socket.
IOException
- for failures in creating the connection.Method Detail |
public boolean equals(Object target)
protected void finalize()
public int hashCode()
public String toString()
public EndpointAddress getDestinationAddress()
public EndpointAddress getConnectionAddress()
public ID getDestinationPeerID()
protected void start()
public void sendMessage(Message msg) throws IOException
msg
- the message to send.
IOException
public void run()
run
in interface Runnable
public void close()
public boolean isConnected()
public long getLastUsed()
TransportBindingMeter getTransportBindingMeter()
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |