|
SecurePlayLibray J2SE v2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.SecurePlay.Comms.SPCGenericCommsServer.SPCGenericCommsDriverClass
com.SecurePlay.Comms.SPCcommsTCP.SPCcommsTCP
TCP comms class is an extention of a GenericCommsDriver class. This class supports TCP.
![]() |
![]() |
| Field Summary | |
protected boolean |
listen
Flag to continue to listen to a port. |
protected java.util.Vector |
listeners
Stores all the listeners that this driver has. |
protected SPMap |
socketConnections
Map that contains all the connections this driver has made. |
protected SPMap |
uniqueAddress
Map that contains the common address that SPL uses and the unique address that TCP uses. |
| Fields inherited from class com.SecurePlay.Comms.SPCGenericCommsServer.SPCGenericCommsDriverClass |
commsServer |
| Constructor Summary | |
SPCcommsTCP()
Constructor |
|
SPCcommsTCP(boolean push,
boolean relay)
|
|
| Method Summary | |
boolean |
containsUniqueAddress(java.net.InetAddress add)
Checks to see if the unique address exists in this driver. |
boolean |
createConnection(java.lang.String address,
int portIN)
Creates a connection. |
boolean |
createConnection(java.lang.String address,
java.net.Socket socket)
Creates a connection. |
java.lang.String |
getAddress(java.net.InetAddress add)
Checks to see if the unique address exists in this driver. |
java.lang.String |
getCommsDriverType()
This method returns the driver type. |
int |
getListenerCount()
Returns the number of listeners this driver has. |
boolean |
isListen()
Returns the listener flag. |
boolean |
isReady()
Checks to see if every address has a unique address set. |
int |
numConnections()
Returns number of connections available. |
boolean |
prsend(java.lang.String address,
byte[] messages)
Sends the message. |
boolean |
removeConnection(java.lang.String address)
Removes the connection and closes the connection class. |
boolean |
setUniqueAddress(java.lang.String address,
java.net.InetAddress uniqueAddress)
Sets a unique address and associates it with an address. |
boolean |
StartListen(int portIN)
Start to listen. |
void |
StopListen()
Stops the listener by setting the listener flag to false. |
boolean |
unsetUniqueAddress(java.lang.String address)
Unsets a unique address. |
| Methods inherited from class com.SecurePlay.Comms.SPCGenericCommsServer.SPCGenericCommsDriverClass |
addAddress, addressSupportsRelay, clearAddresses, containsAddress, getAddressList, getServer, isConfigured, isPush, isRelay, MessArrAddMessArr, prpoll, removeAddress, sendFromQMessages, sendMessage, SPdeserializeProcessByteArr, SPincoming, SPserialize, SPserialize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected SPMap socketConnections
protected SPMap uniqueAddress
protected boolean listen
protected java.util.Vector listeners
| Constructor Detail |
public SPCcommsTCP()
public SPCcommsTCP(boolean push,
boolean relay)
| Method Detail |
public boolean StartListen(int portIN)
portIN - int - port it will listen to.
voidpublic void StopListen()
public boolean isListen()
public boolean setUniqueAddress(java.lang.String address,
java.net.InetAddress uniqueAddress)
address - String - addressuniqueAddress - InetAddress - unique address that gets associated with the address.
public boolean unsetUniqueAddress(java.lang.String address)
address - String - address associated with the unique address.
public boolean removeConnection(java.lang.String address)
address - String - connection to be closed.
public boolean createConnection(java.lang.String address,
int portIN)
throws java.io.IOException
java.io.IOExceptionaddress - String - address to which the connection will be created.portIN - int - port number through which to send messages.
public boolean createConnection(java.lang.String address,
java.net.Socket socket)
throws java.io.IOException
java.io.IOExceptionaddress - String - address to which the connection will be created.socket - Socket - port number through which to send messages.
public boolean prsend(java.lang.String address,
byte[] messages)
prsend in class SPCGenericCommsDriverClassaddress - String - address that this message is sent to.messages - byte[] - message
voidpublic java.lang.String getCommsDriverType()
getCommsDriverType in class SPCGenericCommsDriverClasspublic boolean isReady()
isReady in class SPCGenericCommsDriverClasspublic int numConnections()
public boolean containsUniqueAddress(java.net.InetAddress add)
add - InetAddress - address to be checked
public java.lang.String getAddress(java.net.InetAddress add)
add - InetAddress - address to be checked
public int getListenerCount()
|
SecurePlayLibray J2SE v2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||