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 TypeMethodDescriptionvoidclose()Closes the connectionvoidforwardMessage(UUID id, MessageOut... messages) Forward a message to another ClientvoidforwardPacket(UUID id, PacketOut... packets) Forward a packet to another ClientGet Remote AddressintGet SubData's Block SizevoidGrabs a Client from the NetworkvoidGrabs all the Clients on the NetworkDeprecated.The Client connection to the Server is thisGet the Protocol for this ClientGet the underlying Client SocketbooleanisClosed()Get if the connection has been closedDeprecated.Open an Async Data SubChannelvoidping(Consumer<PingResponse> response) Ping the Servervoidping(UUID id, Consumer<PingResponse> response) Ping a remote Clientvoidreconnect(SubDataClient client) Reconnect the data stream using another ClientvoidsendMessage(MessageOut... messages) Send a message to the ServervoidsendPacket(PacketOut... packets) Send a packet to ClientvoidsetBlockSize(Integer size) Set SubData's Block SizevoidtempBlockSize(Integer size) Set SubData's Block Size for the current packetMethods inherited from class net.ME1312.SubData.Client.DataClient
getID, waitForMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.ME1312.SubData.Client.DataSender
getID
-
Method Details
-
sendPacket
Send a packet to Client- Specified by:
sendPacketin 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:DataClientSend a message to the Server- Specified by:
sendMessagein interfaceDataSender- Specified by:
sendMessagein classDataClient- Parameters:
messages- Messages to send- See Also:
-
forwardMessage
Description copied from class:DataClientForward a message to another Client- Specified by:
forwardMessagein classDataClient- Parameters:
id- Client IDmessages- Messages to send- See Also:
-
getClient
Description copied from class:DataClientGrabs a Client from the Network- Specified by:
getClientin classDataClient- Parameters:
id- Client ID
-
getClients
Description copied from class:DataClientGrabs all the Clients on the Network- Specified by:
getClientsin classDataClient
-
ping
Description copied from class:DataClientPing the Server- Specified by:
pingin interfaceDataSender- Specified by:
pingin classDataClient- Parameters:
response- Ping Response
-
ping
Description copied from class:DataClientPing a remote Client- Specified by:
pingin 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:
getConnectionin interfaceDataSender- Specified by:
getConnectionin interfaceSubDataSender- Overrides:
getConnectionin classDataClient- Returns:
- This Client
-
getProtocol
Description copied from class:DataClientGet the Protocol for this Client- Specified by:
getProtocolin interfaceDataSender- Specified by:
getProtocolin interfaceSubDataSender- Specified by:
getProtocolin classDataClient- Returns:
- Client Protocol
-
getAddress
Description copied from class:DataClientGet Remote Address- Specified by:
getAddressin classDataClient- Returns:
- Address
-
getBlockSize
public int getBlockSize()Get SubData's Block Size- Specified by:
getBlockSizein 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:
tempBlockSizein classDataClient- Parameters:
size- Block Size (null for default)
-
newChannel
Deprecated.Description copied from class:DataClientOpen an Async Data SubChannel- Specified by:
newChannelin 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:DataClientCloses the connection- Specified by:
closein classDataClient
-
isClosed
public boolean isClosed()Description copied from class:DataClientGet if the connection has been closed- Specified by:
isClosedin classDataClient- Returns:
- Closed Status
-