Package server.logic.abstrct
Interface ServerConnection
- All Known Implementing Classes:
DatagramServerConnection
,UdpConnectionBlockDecorator
,UdpServerConnection
public interface ServerConnection
Provides abstract server connection. Use factory methods to create the connection.
- Since:
- 2.0
- Author:
- zerumi
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLoopListener
(ListenLoopListener listener) void
addResponseListeners
(ServerResponseProvider... providers) void
Method for close a connectionvoid
Method for open a connection.void
removeLoopListener
(ListenLoopListener listener) void
removeResponseListeners
(ServerResponseProvider... providers) void
sendData
(byte[] bytesToSend) Method for send data to a server
-
Method Details
-
openConnection
Method for open a connection.- Throws:
IOException
- if I/O occurs
-
closeConnection
Method for close a connection- Throws:
IOException
- if I/O occurs
-
sendData
Method for send data to a server- Parameters:
bytesToSend
- bytes to send- Throws:
IOException
- if I/O occurs
-
addResponseListeners
-
removeResponseListeners
-
getLargeResponseHandler
LargeResponseHandler getLargeResponseHandler() -
addLoopListener
-
removeLoopListener
-