Package net.ME1312.SubData.Server
Class SubDataClient
java.lang.Object
net.ME1312.SubData.Server.DataClient
net.ME1312.SubData.Server.SubDataClient
SubData Client Class
-
Nested Class Summary
Nested classes/interfaces inherited from class net.ME1312.SubData.Server.DataClient
DataClient.Events
-
Field Summary
Fields inherited from class net.ME1312.SubData.Server.DataClient
on
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the connectionGet Remote AddressGets the response from the Authorization Serviceint
Get SubData's Block SizeGets the Linked HandlerGet the Server this Client belongs toGet the underlying Client Socketboolean
isClosed()
Get if the connection has been closedvoid
newChannel
(Consumer<DataClient> client) Deprecated.void
openChannel
(Consumer<SubDataClient> client) Open an Async Data SubChannelvoid
ping
(Consumer<PingResponse> response) Ping the Clientvoid
reconnect
(SubDataClient client) Reconnect the data stream using another Clientvoid
sendMessage
(MessageOut... messages) Send a message to the Clientvoid
sendPacket
(PacketOut... packets) Send a packet to the Clientvoid
setBlockSize
(Integer size) Set SubData's Block Sizevoid
setHandler
(ClientHandler obj) Sets the Handler (should only be called by Handlers themselves)void
tempBlockSize
(Integer size) Set SubData's Block Size for the current packetMethods inherited from class net.ME1312.SubData.Server.DataClient
getID, waitFor
-
Method Details
-
sendPacket
Send a packet to the Client- Parameters:
packets
- Packets to send
-
sendMessage
Description copied from class:DataClient
Send a message to the Client- Specified by:
sendMessage
in classDataClient
- Parameters:
messages
- Messages to send
-
ping
Description copied from class:DataClient
Ping the Client- Specified by:
ping
in classDataClient
- Parameters:
response
- Ping Response
-
getSocket
Get the underlying Client Socket- Returns:
- Client Socket
-
getServer
Get the Server this Client belongs to- Specified by:
getServer
in classDataClient
- Returns:
- SubData Server
-
getAddress
Description copied from class:DataClient
Get Remote Address- Specified by:
getAddress
in classDataClient
- Returns:
- Address
-
getBlockSize
public int getBlockSize()Get SubData's Block Size- Specified by:
getBlockSize
in classDataClient
- Returns:
- Block Size
-
setBlockSize
Set SubData's Block Size- Parameters:
size
- Block Size (null for super)
-
tempBlockSize
Set SubData's Block Size for the current packet- Specified by:
tempBlockSize
in classDataClient
- Parameters:
size
- Block Size (null for default)
-
getAuthResponse
Description copied from class:DataClient
Gets the response from the Authorization Service- Specified by:
getAuthResponse
in classDataClient
- Returns:
- Authorization Service Response
-
getHandler
Description copied from class:DataClient
Gets the Linked Handler- Specified by:
getHandler
in classDataClient
- Returns:
- Handler
-
setHandler
Sets the Handler (should only be called by Handlers themselves)- Parameters:
obj
- Handler- See Also:
-
newChannel
Deprecated.Description copied from class:DataClient
Open an Async Data SubChannel- Specified by:
newChannel
in classDataClient
-
openChannel
Open an Async Data SubChannel -
reconnect
Reconnect the data stream using another Client- Parameters:
client
- Client
-
close
public void close()Description copied from class:DataClient
Closes the connection- Specified by:
close
in classDataClient
-
isClosed
public boolean isClosed()Description copied from class:DataClient
Get if the connection has been closed- Specified by:
isClosed
in classDataClient
- Returns:
- Closed Status
-