de.fhg.igd.semoa.net.farsight
Class FarSightPermission

java.lang.Object
  extended byjava.security.Permission
      extended byde.fhg.igd.util.AbstractPermission
          extended byde.fhg.igd.semoa.net.farsight.FarSightPermission
All Implemented Interfaces:
Guard, Serializable

public class FarSightPermission
extends AbstractPermission

Represents permissions to use FarSight service. FarSight allows to discover SeMoA hosts accross the boundaries of the local intranet, and thereby extends the functionality of Vicinity. This permission restricts the access to FarSight interface for agents. This is especially interesting in the context of the explorer strategies. The target is the regular expression used as key for lookup. The actions are defined as follows

get
get collected host informations from FarSight.
set
update FarSight's host list.
Remark that each host is responsible for its own security. Hence a restrictive permission setting at this host is neither able nor intended to protect any remote host.

Version:
"$Id: FarSightPermission.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Peters
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class de.fhg.igd.util.AbstractPermission
AbstractPermission.AbstractPermissionCollection
 
Field Summary
private static String[] acronyms_
          The list os actions supported by this permission class.
private  String expr_
           
 
Fields inherited from class de.fhg.igd.util.AbstractPermission
 
Fields inherited from class java.security.Permission
 
Constructor Summary
FarSightPermission(String expr, String actions)
          Creates an instance with the given expression and actions.
 
Method Summary
 boolean equals(Object o)
          Compares this permission with the given object for equality.
 String getActions()
           
 boolean implies(Permission p)
          Returns true if this permission implies the given one.
 String toString()
           
 
Methods inherited from class de.fhg.igd.util.AbstractPermission
getActions, getActionsMask, getActionsMask, hashCode, newPermissionCollection, toString
 
Methods inherited from class java.security.Permission
checkGuard, getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

acronyms_

private static String[] acronyms_
The list os actions supported by this permission class.


expr_

private String expr_
Constructor Detail

FarSightPermission

public FarSightPermission(String expr,
                          String actions)
Creates an instance with the given expression and actions.

Parameters:
expr - The target, a regular expression.
actions - The list of actions as describd above.
Method Detail

getActions

public String getActions()

toString

public String toString()

implies

public boolean implies(Permission p)
Description copied from class: AbstractPermission
Returns true if this permission implies the given one. The given permission is implied if: If this permission's name is null then any name in p is matched.

Parameters:
p - the Permission which is checked for implication.
Returns:
true iff this Permission implies the given one.

equals

public boolean equals(Object o)
Description copied from class: AbstractPermission
Compares this permission with the given object for equality. This permission equals the given object if: Equality of names is determined by means of object reference identity or, if that fails, by means of the equals method of this permission's name.

Parameters:
o - The object to test for equality.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.