java.net
Class SocketPermissionCollection

java.lang.Object
  extended byjava.security.PermissionCollection
      extended byjava.net.SocketPermissionCollection
All Implemented Interfaces:
Serializable

final class SocketPermissionCollection
extends java.security.PermissionCollection
implements Serializable

if (init'd with IP, key is IP as string) if wildcard, its the wild card else its the cname?

Author:
Roland Schemers
See Also:
Permission, Permissions, PermissionCollection, Serialized Form

Field Summary
private  List perms
           
private static ObjectStreamField[] serialPersistentFields
           
private static long serialVersionUID
           
 
Fields inherited from class java.security.PermissionCollection
 
Constructor Summary
SocketPermissionCollection()
          Create an empty SocketPermissions object.
 
Method Summary
 void add(java.security.Permission permission)
          Adds a permission to the SocketPermissions.
 Enumeration elements()
          Returns an enumeration of all the SocketPermission objects in the container.
 boolean implies(java.security.Permission permission)
          Check and see if this collection of permissions implies the permissions expressed in "permission".
private  void readObject(ObjectInputStream in)
           
private  void writeObject(ObjectOutputStream out)
           
 
Methods inherited from class java.security.PermissionCollection
isReadOnly, setReadOnly, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

perms

private transient List perms

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

serialPersistentFields

private static final ObjectStreamField[] serialPersistentFields
Constructor Detail

SocketPermissionCollection

public SocketPermissionCollection()
Create an empty SocketPermissions object.

Method Detail

add

public void add(java.security.Permission permission)
Adds a permission to the SocketPermissions. The key for the hash is the name in the case of wildcards, or all the IP addresses.

Parameters:
permission - the Permission object to add.
Throws:
IllegalArgumentException - - if the permission is not a SocketPermission
SecurityException - - if this SocketPermissionCollection object has been marked readonly

implies

public boolean implies(java.security.Permission permission)
Check and see if this collection of permissions implies the permissions expressed in "permission".

Returns:
true if "permission" is a proper subset of a permission in the collection, false if not.

elements

public Enumeration elements()
Returns an enumeration of all the SocketPermission objects in the container.

Returns:
an enumeration of all the SocketPermission objects.

writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException
Throws:
IOException

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException