|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kaos.policy.guard.PermissionClassifier
public class PermissionClassifier
This class is used when Guard forbids an action based on some A- policy. That is, when Guard's 'checkPermission()' throws an authorization exception. In this case, that ActionInstanceDescription instance and the exception is passed to this class (if so configured), and this class, based on its configuration, either contacts a human, or Kaa, to see if that policy can be overridden and authorization granted in this instance.
Field Summary | |
---|---|
protected java.util.Vector |
_actionsForAppeal
|
protected java.lang.String |
_firstContact
|
protected Locator |
_kaaLocator
|
protected KAoSAgentDirectoryServiceProxy |
_kaosDirectoryService
|
protected java.util.Vector |
_msgQueue
|
protected Locator |
_myLocator
|
protected java.lang.String |
_nickName
|
protected java.lang.String |
_secondContact
|
protected Locator |
_slikLocator
|
protected int |
_timeout
|
protected TransportSupport |
_transport
|
protected java.lang.String |
_transportType
|
static java.lang.String |
KAA
|
static java.lang.String |
SLIK
|
Constructor Summary | |
---|---|
PermissionClassifier(KAoSAgentDirectoryServiceProxy dirProxy,
java.lang.String transportType,
java.util.Vector actions)
|
Method Summary | |
---|---|
boolean |
alternateCheckPermission(ActionInstanceDescription actionInstDesc,
KAoSSecurityException exp)
|
boolean |
checkPermission(ActionInstanceDescription actionInstDesc,
KAoSSecurityException exp)
The method to process the given authorization exception for the given action and see if that action can be allowed. |
Locator |
getLocatorForAgentNickname(java.lang.String nickName)
A method for sending a query to directory service to find an agent's description, and from that, its locator. |
protected void |
printDebugString(java.lang.String msg,
int loggerDisplayLevel)
|
void |
receiveMessage(TransportMessage tm)
|
void |
setFirstContact(java.lang.String contact)
A method for specifying whom the classifier should contact first for appealing. |
void |
setSecondContact(java.lang.String contact)
A method for specifying whom the classifier should contact if the first contact does not respond. |
void |
setTimeoutValue(int timeout)
A method for specifying the amount of time (in miliseconds) this classifier should wait for reply after contacting slik or Kaa. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String _nickName
protected java.lang.String _transportType
protected KAoSAgentDirectoryServiceProxy _kaosDirectoryService
protected TransportSupport _transport
protected Locator _myLocator
protected java.util.Vector _msgQueue
protected java.util.Vector _actionsForAppeal
protected Locator _slikLocator
protected Locator _kaaLocator
protected java.lang.String _firstContact
protected java.lang.String _secondContact
protected int _timeout
public static final java.lang.String SLIK
public static final java.lang.String KAA
Constructor Detail |
---|
public PermissionClassifier(KAoSAgentDirectoryServiceProxy dirProxy, java.lang.String transportType, java.util.Vector actions)
Method Detail |
---|
public void setFirstContact(java.lang.String contact)
contact
- A String specifying either slik or Kaa.
null if no one is to be contacted as first
contact.public void setSecondContact(java.lang.String contact)
contact
- A String specifying either slik or Kaa.
null if no one is to be contacted as second
contact.public void setTimeoutValue(int timeout)
timeout
- the timeout valuepublic Locator getLocatorForAgentNickname(java.lang.String nickName)
nickName
- the nickname of the agent whose locator
we want to find.
public boolean checkPermission(ActionInstanceDescription actionInstDesc, KAoSSecurityException exp) throws KAoSSecurityException
actionInstDesc
- the action that caused the
authorization exception.forbiddingPolicyID
- the id of the policy forbidding the
given action.
KAoSSecurityException
public boolean alternateCheckPermission(ActionInstanceDescription actionInstDesc, KAoSSecurityException exp) throws KAoSSecurityException
KAoSSecurityException
public void receiveMessage(TransportMessage tm)
protected void printDebugString(java.lang.String msg, int loggerDisplayLevel)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |