SecurePlayLibray J2SE
v2.1

com.SecurePlay.Comms.SPCcommsUDP
Class SPCcommsUDP

java.lang.Object
  extended bycom.SecurePlay.Comms.SPCGenericCommsServer.SPCGenericCommsDriverClass
      extended bycom.SecurePlay.Comms.SPCcommsUDP.SPCcommsUDP

public class SPCcommsUDP
extends SPCGenericCommsDriverClass

UDP comms class is an extention of a GenericCommsDriver class. This class supports UDP.

Author:
IT GlobalSecure
See Also:
SecurePlay License Information
 

Field Summary
(package private)  SPMap addressPort
          Map contains address and a port that this address is listening on.
(package private)  boolean listen
          Flag to continue to listen to a port.
(package private)  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
SPCcommsUDP(boolean listening, boolean push, boolean relay)
          Constructor
 
Method Summary
 boolean containsUniqueAddress(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.
 boolean isListen()
          Returns the listener flag.
 boolean isReady()
          Checks to see if every address has a unique address set.
 boolean prsend(java.lang.String address, byte[] messages)
          Sends the message.
 boolean recieveUDP(java.net.DatagramPacket p)
          Recieves DatagramPacket.
 boolean setUniqueAddress(java.lang.String address, java.net.InetAddress uniqueAddress, int port)
          Sets a unique address.
 boolean StartListen(int ListenPort)
          Method that lets the class to start listen.
 void StopListen()
          Sets the listener flag to false, which will tell all the listeners to stop listening.
 boolean unsetUniqueAddress(java.lang.String address)
          Unsets a unique address associated with this 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

uniqueAddress

SPMap uniqueAddress
Map that contains the common address that SPL uses and the unique address that TCP uses. map


addressPort

SPMap addressPort
Map contains address and a port that this address is listening on. map


listen

boolean listen
Flag to continue to listen to a port.

Constructor Detail

SPCcommsUDP

public SPCcommsUDP(boolean listening,
                   boolean push,
                   boolean relay)
Constructor

Method Detail

StartListen

public boolean StartListen(int ListenPort)
Method that lets the class to start listen. void


StopListen

public void StopListen()
Sets the listener flag to false, which will tell all the listeners to stop listening. void


isListen

public boolean isListen()
Returns the listener flag. Used by listener classes to check if they should continue to listen.

Returns:
boolean

isReady

public boolean isReady()
Checks to see if every address has a unique address set.

Overrides:
isReady in class SPCGenericCommsDriverClass
Returns:
boolean

setUniqueAddress

public boolean setUniqueAddress(java.lang.String address,
                                java.net.InetAddress uniqueAddress,
                                int port)
Sets a unique address.

Parameters:
address - String - address
uniqueAddress - InetAddress - unique address
port - int - port that this address is listening on
Returns:
boolean

unsetUniqueAddress

public boolean unsetUniqueAddress(java.lang.String address)
Unsets a unique address associated with this address.

Parameters:
address - String - address
Returns:
boolean

recieveUDP

public boolean recieveUDP(java.net.DatagramPacket p)
Recieves DatagramPacket. Gets the byte[] data from it and passes it back to the main driver for further proccessing.

Parameters:
p - DatagramPacket - packet that contains the message.
Returns:
boolean

prsend

public boolean prsend(java.lang.String address,
                      byte[] messages)
Sends the message.

Overrides:
prsend in class SPCGenericCommsDriverClass
Parameters:
address - String - address that this message is sent to.
messages - byte[] - messages void

getCommsDriverType

public java.lang.String getCommsDriverType()
This method returns the driver type. It will be overridden with specific driver type.

Overrides:
getCommsDriverType in class SPCGenericCommsDriverClass
Returns:
String

containsUniqueAddress

public boolean containsUniqueAddress(java.net.InetAddress add)
Checks to see if the unique address exists in this driver.

Parameters:
add - InetAddress - address to be checked
Returns:
boolean

SecurePlayLibray J2SE
v2.1

2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.