Package org.teamapps.cluster.network
Class Connection
java.lang.Object
org.teamapps.cluster.network.Connection
public class Connection
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static intMAX_MESSAGE_SIZE -
Constructor Summary
Constructors Constructor Description Connection(ConnectionHandler connectionHandler, java.net.Socket socket, NodeAddress nodeAddress)Connection(ConnectionHandler connectionHandler, NodeAddress nodeAddress) -
Method Summary
Modifier and Type Method Description voidcloseConnection()NodeAddressgetNodeAddress()booleanisActive()booleanisOutgoing()voidsetConnectionHandler(ConnectionHandler connectionHandler)booleanwriteMessage(byte[] bytes)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MAX_MESSAGE_SIZE
public static final int MAX_MESSAGE_SIZE- See Also:
- Constant Field Values
-
-
Constructor Details
-
Connection
public Connection(ConnectionHandler connectionHandler, java.net.Socket socket, NodeAddress nodeAddress) -
Connection
-
-
Method Details
-
setConnectionHandler
-
closeConnection
public void closeConnection() -
writeMessage
public boolean writeMessage(byte[] bytes) -
isActive
public boolean isActive() -
isOutgoing
public boolean isOutgoing() -
getNodeAddress
-