edu.nyu.cs.pdsg.switchboard.authorization
Class SbAuthorizationLayer

java.lang.Object
  extended byedu.nyu.cs.pdsg.switchboard.SbStatus
      extended byedu.nyu.cs.pdsg.switchboard.SbLayer
          extended byedu.nyu.cs.pdsg.switchboard.authorization.SbAuthorizationLayer
All Implemented Interfaces:
AuthorizationMonitorCallback, java.lang.Cloneable, SbAsyncTransportClient, SbAsyncTransportProvider, SbAsyncTransportRecipient, SbClient, SbLayerable, SbProvider

public class SbAuthorizationLayer
extends SbLayer
implements AuthorizationMonitorCallback


Nested Class Summary
 class SbAuthorizationLayer.AuthorizeThread
           
 class SbAuthorizationLayer.UpdateCredentialsThread
           
 
Field Summary
private  boolean authorizationDoneFlag
           
(package private)  boolean authorizationOkFlag
           
(package private)  Authorizer authorizer
           
(package private)  SbCipherLayer cipher
           
(package private)  AuthorizationMonitor monitor
           
(package private)  Credentials myCredentials
           
private  boolean partnerAcceptedFlag
           
(package private)  java.security.PublicKey partnerId
           
private  boolean superProviderReadySent
           
 
Fields inherited from class edu.nyu.cs.pdsg.switchboard.SbLayer
client, createStackTrace, eventHandler, provider, recipient
 
Fields inherited from class edu.nyu.cs.pdsg.switchboard.SbStatus
STATUS_CLOSED, STATUS_LIVE, STATUS_PARTNER_CLOSED, STATUS_RECOVERABLE, STATUS_UNRECOVERABLE
 
Constructor Summary
SbAuthorizationLayer(SbAsyncTransportProvider _below, Authorizer _authorizer, Credentials _myCredentials, SbCipherLayer _cipher)
           
 
Method Summary
 void authorizationDone(AuthorizationMonitor _monitor)
           
 void authorizationInform()
          Alerts the callback that something has happened.
 boolean authorizationOk()
           
 void deliver(java.lang.Object msg)
          Defines the behavior how to deliver an Object to the layer above.
 AuthorizationMonitor getAuthorizationMonitor()
           
 java.lang.String getLayerType()
           
 boolean isAuthorized()
           
 void providerReady()
          called when provider is ready
 void resetStatus()
           
private  void trySuperProviderReady()
           
 void write(java.lang.Object msg)
          Defines the behavior how to deliver an Object to the layer above.
 
Methods inherited from class edu.nyu.cs.pdsg.switchboard.SbLayer
_close, behavesLike, close, closeQuiet, finalize, find, getProviderException, getProviderStackTrace, getProviderStatus, getTransportName, handleEvent, handleEvent, init, instanceOf, isKindOf, isOpen, isReady, providerStatusString, recipientReady, sendDown, sendUp, serialize, setClient, setEventHandler, setProvider, setProviderStatus, setProviderStatus, setProviderStatusSend, setRecipient, toShortString, toString, unserialize
 
Methods inherited from class edu.nyu.cs.pdsg.switchboard.SbStatus
statusString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

monitor

AuthorizationMonitor monitor

cipher

SbCipherLayer cipher

authorizer

Authorizer authorizer

partnerId

java.security.PublicKey partnerId

myCredentials

Credentials myCredentials

authorizationOkFlag

boolean authorizationOkFlag

partnerAcceptedFlag

private boolean partnerAcceptedFlag

authorizationDoneFlag

private boolean authorizationDoneFlag

superProviderReadySent

private boolean superProviderReadySent
Constructor Detail

SbAuthorizationLayer

public SbAuthorizationLayer(SbAsyncTransportProvider _below,
                            Authorizer _authorizer,
                            Credentials _myCredentials,
                            SbCipherLayer _cipher)
Method Detail

getAuthorizationMonitor

public AuthorizationMonitor getAuthorizationMonitor()

authorizationOk

public boolean authorizationOk()

trySuperProviderReady

private void trySuperProviderReady()

providerReady

public void providerReady()
Description copied from interface: SbClient
called when provider is ready

Specified by:
providerReady in interface SbClient
Overrides:
providerReady in class SbLayer

authorizationInform

public void authorizationInform()
Description copied from interface: AuthorizationMonitorCallback
Alerts the callback that something has happened.

Specified by:
authorizationInform in interface AuthorizationMonitorCallback

deliver

public void deliver(java.lang.Object msg)
Description copied from interface: SbAsyncTransportRecipient
Defines the behavior how to deliver an Object to the layer above.

Specified by:
deliver in interface SbAsyncTransportRecipient
Overrides:
deliver in class SbLayer

authorizationDone

public void authorizationDone(AuthorizationMonitor _monitor)

write

public void write(java.lang.Object msg)
Description copied from interface: SbAsyncTransportProvider
Defines the behavior how to deliver an Object to the layer above.

Specified by:
write in interface SbAsyncTransportProvider
Overrides:
write in class SbLayer

isAuthorized

public boolean isAuthorized()

resetStatus

public void resetStatus()

getLayerType

public java.lang.String getLayerType()
Overrides:
getLayerType in class SbLayer


Copyright (c) 2002-2003 New York University RLAB