Package net.ME1312.SubData.Server
Class DataClient
java.lang.Object
net.ME1312.SubData.Server.DataClient
SubData Client API Class
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidclose()Closes the connectionabstract InetSocketAddressGet Remote Addressabstract ObjectGets the response from the Authorization Serviceabstract intGet SubData's default Block Sizeabstract ClientHandlerGets the Linked HandlergetID()Get the ID of this Clientabstract DataServerGet the Server this Client belongs toabstract booleanisClosed()Get if the connection has been closedabstract voidnewChannel(Consumer<DataClient> client) Open an Async Data SubChannelabstract voidping(Consumer<PingResponse> response) Ping the Clientabstract voidsendMessage(MessageOut... messages) Send a message to the Clientabstract voidtempBlockSize(Integer size) Set SubData's Block Size for the current messagevoidwaitFor()Wait for the connection to close
-
Field Details
-
on
-
-
Constructor Details
-
DataClient
public DataClient()
-
-
Method Details
-
ping
Ping the Client- Parameters:
response- Ping Response
-
sendMessage
Send a message to the Client- Parameters:
messages- Messages to send
-
getBlockSize
public abstract int getBlockSize()Get SubData's default Block Size- Returns:
- Block Size
-
tempBlockSize
Set SubData's Block Size for the current message- Parameters:
size- Block Size (null for default)
-
getServer
Get the Server this Client belongs to- Returns:
- SubData Server
-
getID
Get the ID of this Client- Returns:
- Client ID
-
getAddress
Get Remote Address- Returns:
- Address
-
getAuthResponse
Gets the response from the Authorization Service- Returns:
- Authorization Service Response
-
getHandler
Gets the Linked Handler- Returns:
- Handler
-
newChannel
Open an Async Data SubChannel -
close
Closes the connection- Throws:
IOException
-
waitFor
Wait for the connection to close- Throws:
InterruptedException
-
isClosed
public abstract boolean isClosed()Get if the connection has been closed- Returns:
- Closed Status
-