Package net.ME1312.SubData.Client
Class SubDataClient
java.lang.Object
net.ME1312.SubData.Client.DataClient
net.ME1312.SubData.Client.SubDataClient
- All Implemented Interfaces:
DataSender
,SubDataSender
SubData Client Class
-
Nested Class Summary
Nested classes/interfaces inherited from class net.ME1312.SubData.Client.DataClient
DataClient.Events
-
Field Summary
Fields inherited from class net.ME1312.SubData.Client.DataClient
on
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the connectionvoid
forwardMessage
(UUID id, MessageOut... messages) Forward a message to another Clientvoid
forwardPacket
(UUID id, PacketOut... packets) Forward a packet to another ClientGet Remote Addressint
Get SubData's Block Sizevoid
Grabs a Client from the Networkvoid
Grabs all the Clients on the NetworkDeprecated.The Client connection to the Server is thisGet the Protocol for this ClientGet the underlying Client Socketboolean
isClosed()
Get if the connection has been closedDeprecated.Open an Async Data SubChannelvoid
ping
(Consumer<PingResponse> response) Ping the Servervoid
ping
(UUID id, Consumer<PingResponse> response) Ping a remote Clientvoid
reconnect
(SubDataClient client) Reconnect the data stream using another Clientvoid
sendMessage
(MessageOut... messages) Send a message to the Servervoid
sendPacket
(PacketOut... packets) Send a packet to Clientvoid
setBlockSize
(Integer size) Set SubData's Block Sizevoid
tempBlockSize
(Integer size) Set SubData's Block Size for the current packetMethods inherited from class net.ME1312.SubData.Client.DataClient
getID, waitFor
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.ME1312.SubData.Client.DataSender
getID
-
Method Details
-
sendPacket
Send a packet to Client- Specified by:
sendPacket
in interfaceSubDataSender
- Parameters:
packets
- Packets to send- See Also:
-
forwardPacket
Forward a packet to another Client- Parameters:
id
- Client IDpackets
- Packets to send- See Also:
-
sendMessage
Description copied from class:DataClient
Send a message to the Server- Specified by:
sendMessage
in interfaceDataSender
- Specified by:
sendMessage
in classDataClient
- Parameters:
messages
- Messages to send- See Also:
-
forwardMessage
Description copied from class:DataClient
Forward a message to another Client- Specified by:
forwardMessage
in classDataClient
- Parameters:
id
- Client IDmessages
- Messages to send- See Also:
-
getClient
Description copied from class:DataClient
Grabs a Client from the Network- Specified by:
getClient
in classDataClient
- Parameters:
id
- Client ID
-
getClients
Description copied from class:DataClient
Grabs all the Clients on the Network- Specified by:
getClients
in classDataClient
-
ping
Description copied from class:DataClient
Ping the Server- Specified by:
ping
in interfaceDataSender
- Specified by:
ping
in classDataClient
- Parameters:
response
- Ping Response
-
ping
Description copied from class:DataClient
Ping a remote Client- Specified by:
ping
in classDataClient
- Parameters:
id
- Client IDresponse
- Ping Response
-
getSocket
Get the underlying Client Socket- Returns:
- Client Socket
-
getConnection
Deprecated.The Client connection to the Server is thisGet the Client that connects the Server to us- Specified by:
getConnection
in interfaceDataSender
- Specified by:
getConnection
in interfaceSubDataSender
- Overrides:
getConnection
in classDataClient
- Returns:
- This Client
-
getProtocol
Description copied from class:DataClient
Get the Protocol for this Client- Specified by:
getProtocol
in interfaceDataSender
- Specified by:
getProtocol
in interfaceSubDataSender
- Specified by:
getProtocol
in classDataClient
- Returns:
- Client Protocol
-
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)
-
newChannel
Deprecated.Description copied from class:DataClient
Open an Async Data SubChannel- Specified by:
newChannel
in classDataClient
- Returns:
- New SubData Channel
- Throws:
IOException
-
openChannel
Open an Async Data SubChannel- Returns:
- New SubData Channel
- Throws:
IOException
-
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
-