|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsynergynetframework.appsystem.services.net.objectmessaging.connections.ConnectionHandler
public class ConnectionHandler
The Class ConnectionHandler.
| Field Summary | |
|---|---|
java.net.InetSocketAddress |
udpRemoteAddress
The udp remote address. |
| Constructor Summary | |
|---|---|
ConnectionHandler(int bufferSize)
Instantiates a new connection handler. |
|
| Method Summary | |
|---|---|
void |
addMessageHandler(MessageHandler handler)
Adds the message handler. |
void |
close()
Close. |
EndPoint |
getEndPoint()
Gets the end point. |
short |
getID()
Gets the id. |
java.net.InetSocketAddress |
getRemoteAddressTCP()
Gets the remote address tcp. |
java.net.InetSocketAddress |
getRemoteAddressUDP()
Gets the remote address udp. |
TCPConnectionHandler |
getTCPConnection()
Gets the TCP connection. |
UDPConnectionHandler |
getUDPConnection()
Gets the UDP connection. |
void |
notifyConnected()
Notify connected. |
void |
notifyReceived(java.lang.Object object)
Notify received. |
void |
removeMessageHandler(MessageHandler handler)
Removes the message handler. |
void |
sendMessage(Message message)
Send message. |
void |
sendTCP(java.lang.Object object)
Send tcp. |
void |
sendUDP(java.lang.Object object)
Send udp. |
void |
setEndPoint(EndPoint endPoint)
Sets the end point. |
void |
setID(short id)
Sets the id. |
void |
setName(java.lang.String name)
Sets the name. |
void |
setTCPAliveTime(int keepAliveMillis)
Sets the TCP alive time. |
void |
setTCPConnection(TCPConnectionHandler tcp)
Sets the TCP connection. |
void |
setUDPConnection(UDPConnectionHandler udp)
Sets the UDP connection. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public java.net.InetSocketAddress udpRemoteAddress
| Constructor Detail |
|---|
public ConnectionHandler(int bufferSize)
bufferSize - the buffer size| Method Detail |
|---|
public void addMessageHandler(MessageHandler handler)
handler - the handlerpublic void close()
public EndPoint getEndPoint()
public short getID()
public java.net.InetSocketAddress getRemoteAddressTCP()
public java.net.InetSocketAddress getRemoteAddressUDP()
public TCPConnectionHandler getTCPConnection()
public UDPConnectionHandler getUDPConnection()
public void notifyConnected()
public void notifyReceived(java.lang.Object object)
object - the objectpublic void removeMessageHandler(MessageHandler handler)
handler - the handler
public void sendMessage(Message message)
throws java.io.IOException
message - the message
java.io.IOException - Signals that an I/O exception has occurred.
public void sendTCP(java.lang.Object object)
throws java.io.IOException
object - the object
java.io.IOException - Signals that an I/O exception has occurred.
public void sendUDP(java.lang.Object object)
throws java.io.IOException
object - the object
java.io.IOException - Signals that an I/O exception has occurred.public void setEndPoint(EndPoint endPoint)
endPoint - the new end pointpublic void setID(short id)
id - the new idpublic void setName(java.lang.String name)
name - the new namepublic void setTCPAliveTime(int keepAliveMillis)
keepAliveMillis - the new TCP alive timepublic void setTCPConnection(TCPConnectionHandler tcp)
tcp - the new TCP connectionpublic void setUDPConnection(UDPConnectionHandler udp)
udp - the new UDP connectionpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||