|
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
class TcpConnection
Low-level TcpMessenger
Constructor Summary | |
---|---|
TcpConnection(EndpointAddress destaddr,
TcpTransport p)
Creates a new TcpConnection for the specified destination address. |
|
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.TcpTransport
- the transport we are working for.
IOException
- for failures in creating the connection.Method Detail |
---|
public boolean equals(Object target)
equals
in class Object
protected void finalize()
finalize
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
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()
true
- if there is an active connection to the remote peer,
otherwise false.public long getLastUsed()
TransportBindingMeter getTransportBindingMeter()
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |