public final class SubDataClient
extends java.lang.Object
Constructor and Description |
---|
SubDataClient(ExHost host,
java.lang.String name,
java.net.InetAddress address,
int port,
Cipher cipher)
SubServers Client Instance
|
Modifier and Type | Method and Description |
---|---|
static void |
addCipher(java.lang.String handle,
Cipher cipher)
Add a Cipher for use by SubData
|
void |
broadcastPacket(PacketOut packet)
Broadcast packet to all Clients
|
void |
destroy(int reconnect)
Drops All Connections and Stops the SubData Listener
|
void |
forwardPacket(PacketOut packet,
java.lang.String location)
Forward Packet to Server
|
Cipher |
getCipher()
Gets the Client's Cipher
|
static Cipher |
getCipher(java.lang.String handle)
Gets a Cipher by Handle
|
static java.util.Map<java.lang.String,Cipher> |
getCiphers()
Gets the Ciphers
|
java.net.Socket |
getClient()
Gets the Client 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(ExHost host, java.lang.String name, java.net.InetAddress address, int port, Cipher cipher) throws java.io.IOException
host
- SubServers.Hostname
- Name of Hostaddress
- Addressport
- Portcipher
- Cipherjava.io.IOException
public java.lang.String getName()
public java.net.Socket getClient()
public static void addCipher(java.lang.String handle, Cipher cipher)
cipher
- Cipher to Addhandle
- Handle to Bindpublic static java.util.Map<java.lang.String,Cipher> getCiphers()
public Cipher getCipher()
public static Cipher getCipher(java.lang.String handle)
handle
- Handlepublic 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 forwardPacket(PacketOut packet, java.lang.String location)
packet
- Packet to sendlocation
- Where to sendpublic void broadcastPacket(PacketOut packet)
packet
- Packet to sendpublic void destroy(int reconnect) throws java.io.IOException
java.io.IOException