Package net.ME1312.SubData.Server
Class DataClient
java.lang.Object
net.ME1312.SubData.Server.DataClient
SubData Client API Class
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
close()
Closes the connectionabstract InetSocketAddress
Get Remote Addressabstract Object
Gets the response from the Authorization Serviceabstract int
Get SubData's default Block Sizeabstract ClientHandler
Gets the Linked HandlergetID()
Get the ID of this Clientabstract DataServer
Get the Server this Client belongs toabstract boolean
isClosed()
Get if the connection has been closedabstract void
newChannel
(Consumer<DataClient> client) Open an Async Data SubChannelabstract void
ping
(Consumer<PingResponse> response) Ping the Clientabstract void
sendMessage
(MessageOut... messages) Send a message to the Clientabstract void
tempBlockSize
(Integer size) Set SubData's Block Size for the current messagevoid
waitFor()
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
-