|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.net.ServerSocket uk.org.iscream.cms.util.ACLServerSocket
Access Control List ServerSocket wrapper. Used to wrap a ServerSocket with an ACL, whilst extending ServerSocket to make integration into code easier. Once the ACL has been set, accept() can be used exactly as it would be with a ServerSocket.
Field Summary | |
private ACL |
_acl
The ACL used by this ACLServerSocket. |
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.ServerSocket |
|
Constructor Summary | |
ACLServerSocket(ACL acl,
int port)
See relevant ServerSocket constructor, and sets the default acl. |
|
ACLServerSocket(ACL acl,
int port,
int backlog)
See relevant ServerSocket constructor, and sets the default acl. |
|
ACLServerSocket(ACL acl,
int port,
int backlog,
InetAddress bindAddr)
See relevant ServerSocket constructor, and sets the default acl. |
|
ACLServerSocket(int port)
See relevant ServerSocket constructor. |
|
ACLServerSocket(int port,
int backlog)
See relevant ServerSocket constructor. |
|
ACLServerSocket(int port,
int backlog,
InetAddress bindAddr)
See relevant ServerSocket constructor. |
Method Summary | |
Socket |
accept()
Essentially has the same behaviour as the ServerSocket.accept() method, except won't return a Socket unless it is permitted by the ACL. |
void |
setACL(ACL acl)
Set the ACL at any point in the operation of the ServerSocket. |
String |
toString()
Overrides the Object.toString()
method to provide clean logging (every class should have this). |
Methods inherited from class java.net.ServerSocket |
bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout |
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 ACLServerSocket(int port) throws IOException
public ACLServerSocket(int port, int backlog) throws IOException
public ACLServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException
public ACLServerSocket(ACL acl, int port) throws IOException
public ACLServerSocket(ACL acl, int port, int backlog) throws IOException
public ACLServerSocket(ACL acl, int port, int backlog, InetAddress bindAddr) throws IOException
Method Detail |
public Socket accept() 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 |