edu.nyu.cs.pdsg.trust.impl
Class SimpleAuthorizationMonitorImpl

java.lang.Object
  extended byedu.nyu.cs.pdsg.trust.impl.SimpleAuthorizationMonitorImpl
All Implemented Interfaces:
AuthorizationMonitor
Direct Known Subclasses:
AllAuthorizationMonitorImpl, DrbacAllAuthorizationMonitor, TimedAuthorizationMonitor

public class SimpleAuthorizationMonitorImpl
extends java.lang.Object
implements AuthorizationMonitor

Simple implementation of Authoriziation Monitor. Can be extended.


Field Summary
private  AuthorizationMonitorCallback callback
          Should be extended to allow for multiple callbacks
private  boolean state
          The current state of authorization
 
Constructor Summary
SimpleAuthorizationMonitorImpl()
           
 
Method Summary
 void addCallback(AuthorizationMonitorCallback amc)
          Add a callback that will be informed of changes to the credentialed trust status
 Credentials getCredentials()
          Returns the contained Credentials to a party with previous knowledge of the type of Credential and how to use them.
 void init()
          pure virtual
 boolean isAuthorized()
          Gets the current state of authorization
 void removeCallback(AuthorizationMonitorCallback amc)
          Remove a callback
 void setState(boolean newState)
          Not part of the formal AuthorizationMonitor definition.
 void updateCredentials(Credentials creds)
          Allows the auhorized party to provide a new set of credentials.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

state

private boolean state
The current state of authorization


callback

private AuthorizationMonitorCallback callback
Should be extended to allow for multiple callbacks

Constructor Detail

SimpleAuthorizationMonitorImpl

public SimpleAuthorizationMonitorImpl()
Method Detail

isAuthorized

public boolean isAuthorized()
Gets the current state of authorization

Specified by:
isAuthorized in interface AuthorizationMonitor

updateCredentials

public void updateCredentials(Credentials creds)
Allows the auhorized party to provide a new set of credentials. The AuthorizationMonitor should check the new credentials, see that they are valid, and seamlessly change its focus to the new credentials.

Specified by:
updateCredentials in interface AuthorizationMonitor

getCredentials

public Credentials getCredentials()
Returns the contained Credentials to a party with previous knowledge of the type of Credential and how to use them.


addCallback

public void addCallback(AuthorizationMonitorCallback amc)
Add a callback that will be informed of changes to the credentialed trust status

Specified by:
addCallback in interface AuthorizationMonitor

removeCallback

public void removeCallback(AuthorizationMonitorCallback amc)
Remove a callback

Specified by:
removeCallback in interface AuthorizationMonitor

init

public void init()
pure virtual

Specified by:
init in interface AuthorizationMonitor

setState

public void setState(boolean newState)
Not part of the formal AuthorizationMonitor definition. Used for development.



Copyright (c) 2002-2003 New York University RLAB