public final class SubDataClient
extends java.lang.Object
Constructor and Description |
---|
SubDataClient(SubServers host,
java.lang.String name,
java.net.InetAddress address,
int port)
SubServers Client Instance
|
Modifier and Type | Method and Description |
---|---|
void |
destroy(boolean reconnect)
Drops All Connections and Stops the SubData Listener
|
java.net.Socket |
getClient()
Gets the Server Socket
|
java.lang.String |
getName()
Gets the Assigned Host Name
|
static java.util.List<? extends PacketIn> |
getPacket(java.lang.String handle)
Grab PacketIn Instances via handle
|
static void |
registerPacket(java.lang.Class<? extends PacketOut> packet,
java.lang.String handle)
Register PacketOut to the Network
|
static void |
registerPacket(PacketIn packet,
java.lang.String handle)
Register PacketIn to the Network
|
void |
sendPacket(PacketOut packet)
Send Packet to Client
|
static void |
unregisterPacket(java.lang.Class<? extends PacketOut> packet)
Unregister PacketOut to the Network
|
static void |
unregisterPacket(PacketIn packet)
Unregister PacketIn from the Network
|
public SubDataClient(SubServers host, java.lang.String name, java.net.InetAddress address, int port) throws java.io.IOException
host
- SubPluginaddress
- Bind Addressport
- Portjava.io.IOException
public java.lang.String getName()
public java.net.Socket getClient()
public static void registerPacket(PacketIn packet, java.lang.String handle)
packet
- PacketIn to registerhandle
- Handle to Bindpublic static void unregisterPacket(PacketIn packet)
packet
- PacketIn to unregisterpublic static void registerPacket(java.lang.Class<? extends PacketOut> packet, java.lang.String handle)
packet
- PacketOut to registerhandle
- Handle to bindpublic static void unregisterPacket(java.lang.Class<? extends PacketOut> packet)
packet
- PacketOut to unregisterpublic static java.util.List<? extends PacketIn> getPacket(java.lang.String handle)
handle
- Handlepublic void sendPacket(PacketOut packet)
packet
- Packet to sendpublic void destroy(boolean reconnect) throws java.io.IOException
java.io.IOException