|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.net.DatagramSocket uk.org.iscream.cms.util.ACLDatagramSocket
Access Control List DatagramSocket wrapper. Used to wrap a DatagramSocket with an ACL, whilst extending DatagramSocket to make integration into code easier. Once the ACL has been set, receive() can be used exactly as it would be with a DatagramSocket.
Field Summary | |
private ACL |
_acl
The ACL used by this ACLDatagramSocket. |
private String |
_name
This is the friendly identifier of the component this class is running in. |
static String |
REVISION
The current CVS revision of this class |
Fields inherited from class java.net.DatagramSocket |
|
Constructor Summary | |
ACLDatagramSocket()
See relevant DatagramSocket constructor. |
|
ACLDatagramSocket(ACL acl)
See relevant DatagramSocket constructor, and sets the default acl. |
|
ACLDatagramSocket(ACL acl,
int port)
See relevant DatagramSocket constructor, and sets the default acl. |
|
ACLDatagramSocket(ACL acl,
int port,
InetAddress laddr)
See relevant DatagramSocket constructor, and sets the default acl. |
|
ACLDatagramSocket(int port)
See relevant DatagramSocket constructor. |
|
ACLDatagramSocket(int port,
InetAddress laddr)
See relevant DatagramSocket constructor. |
Method Summary | |
void |
receive(DatagramPacket p)
Essentially has the same behaviour as the Datagram.receive() method, except won't return unless it is permitted by the ACL. |
void |
setACL(ACL acl)
Set the ACL at any point in the operation of the DatagramSocket. |
String |
toString()
Overrides the Object.toString()
method to provide clean logging (every class should have this). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String REVISION
private String _name
private ACL _acl
Constructor Detail |
public ACLDatagramSocket() throws IOException
public ACLDatagramSocket(int port) throws IOException
public ACLDatagramSocket(int port, InetAddress laddr) throws IOException
public ACLDatagramSocket(ACL acl) throws IOException
public ACLDatagramSocket(ACL acl, int port) throws IOException
public ACLDatagramSocket(ACL acl, int port, InetAddress laddr) throws IOException
Method Detail |
public void receive(DatagramPacket p) throws IOException
IOException
public void setACL(ACL acl)
acl
- the new ACL to applypublic String toString()
Object.toString()
method to provide clean logging (every class should have this).
This uses the uk.org.iscream.cms.server.util.FormatName class
to format the toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |