ponderEnforcement.ponderMC
Class PonderMCimpl

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--ponderEnforcement.ponderMC.PonderMCimpl
All Implemented Interfaces:
PonderMC, java.rmi.Remote, java.io.Serializable

public class PonderMCimpl
extends java.rmi.server.UnicastRemoteObject
implements PonderMC

Function: The Ponder Management Component Implementation

See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
PonderMCimpl(java.lang.String newRmiName)
          Constructor called when started as syandalone
PonderMCimpl(java.lang.String newRmiName, PMCServer newPmcServer)
          Constructor called when started by a PMCServer
 
Method Summary
 void disableOblig(java.lang.String policyName)
          disable an obligation policy object
 void disableRefrain(java.lang.String policyName)
          disable a refrain policy object
 void enableOblig(java.lang.String policyName)
          enable an obligation policy object
 void enableRefrain(java.lang.String policyName)
          enable a refrain policy object
 boolean execAction(java.lang.String name, java.util.LinkedList params)
          Execute a local (loaded) Action
 java.lang.String getID()
          Returns the Unique Id of the PMC.
 java.util.Vector getObligsInfo()
          Returns information about the obligation policies loaded in the PMC
 java.util.Vector getRefrainsInfo()
          Returns information about the refrain policies loaded in the PMC
 boolean isActive()
          A test method to return true or false depending on the status of this component
 void load(java.lang.String policyName, ObligationI obligation)
          load an obligation policy object
 void load(java.lang.String policyName, RefrainI refrain)
          load a refrain policy object
 void loadAction(PmcAction action)
          Loads a new PmcAction object in the PMC
static void main(java.lang.String[] args)
          Name: main.
 void setDirName(java.lang.String newDirName)
          Set the directory location where the PMC is bound.
 void stopMC()
          Stop the execution of the management component.
 void unloadOblig(java.lang.String policyName)
          unload an obligation policy object
 void unloadRefrain(java.lang.String policyName)
          unload a refrain policy object
 void writeClass(java.lang.String className, byte[] classBytes)
          write Class locally SHOULD NOT BE USED EVENTUALLY
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PonderMCimpl

public PonderMCimpl(java.lang.String newRmiName)
             throws java.rmi.RemoteException
Constructor called when started as syandalone
Parameters:
newRmiName - The name with which to bind the object to the RMI registry

PonderMCimpl

public PonderMCimpl(java.lang.String newRmiName,
                    PMCServer newPmcServer)
             throws java.rmi.RemoteException
Constructor called when started by a PMCServer
Parameters:
newRmiName - The name with which to binf the object to the RMI Registry
newPmcServer - A reference to the PMCServer object which creates this instance
Method Detail

setDirName

public void setDirName(java.lang.String newDirName)
                throws java.rmi.RemoteException
Set the directory location where the PMC is bound. Needed in case it is run as standalone
Specified by:
setDirName in interface PonderMC
Parameters:
newDirName - The name in the Ldap Directory

load

public void load(java.lang.String policyName,
                 ObligationI obligation)
          throws java.rmi.RemoteException
load an obligation policy object
Specified by:
load in interface PonderMC
Parameters:
policyName - The name of the policy to load
obligation - The obligation policy object to load

load

public void load(java.lang.String policyName,
                 RefrainI refrain)
          throws java.rmi.RemoteException
load a refrain policy object
Specified by:
load in interface PonderMC
Parameters:
policyName - The name of the policy to load
refrain - The refrain policy object to load

unloadOblig

public void unloadOblig(java.lang.String policyName)
                 throws java.rmi.RemoteException
unload an obligation policy object
Specified by:
unloadOblig in interface PonderMC
Parameters:
policyName - The name of the obligation policy to unload

unloadRefrain

public void unloadRefrain(java.lang.String policyName)
                   throws java.rmi.RemoteException
unload a refrain policy object
Specified by:
unloadRefrain in interface PonderMC
Parameters:
policyName - The name of the refrain policy to unload

enableOblig

public void enableOblig(java.lang.String policyName)
                 throws java.rmi.RemoteException
enable an obligation policy object
Specified by:
enableOblig in interface PonderMC
Parameters:
policyName - The name of the obligation policy to enable

enableRefrain

public void enableRefrain(java.lang.String policyName)
                   throws java.rmi.RemoteException
enable a refrain policy object
Specified by:
enableRefrain in interface PonderMC
Parameters:
policyName - The name of the refrain policy to enable

disableOblig

public void disableOblig(java.lang.String policyName)
                  throws java.rmi.RemoteException
disable an obligation policy object
Specified by:
disableOblig in interface PonderMC
Parameters:
policyName - The name of the obligation policy to disable

disableRefrain

public void disableRefrain(java.lang.String policyName)
                    throws java.rmi.RemoteException
disable a refrain policy object
Specified by:
disableRefrain in interface PonderMC
Parameters:
policyName - The name of the refrain policy to disable

getObligsInfo

public java.util.Vector getObligsInfo()
                               throws java.rmi.RemoteException
Returns information about the obligation policies loaded in the PMC
Specified by:
getObligsInfo in interface PonderMC
Returns:
A Vector of ponderToolkit.utilities.policy.ObligInfo objects

getRefrainsInfo

public java.util.Vector getRefrainsInfo()
                                 throws java.rmi.RemoteException
Returns information about the refrain policies loaded in the PMC
Specified by:
getRefrainsInfo in interface PonderMC
Returns:
A Vector of ponderToolkit.utilities.policy.RefrainInfo objects

stopMC

public void stopMC()
            throws java.rmi.RemoteException
Stop the execution of the management component. Unbind from the directory service and the RMI registry
Specified by:
stopMC in interface PonderMC

getID

public java.lang.String getID()
                       throws java.rmi.RemoteException
Returns the Unique Id of the PMC. The unique ID is the RMI-name
Specified by:
getID in interface PonderMC
Returns:
The RMI-bind name of the PMC object

writeClass

public void writeClass(java.lang.String className,
                       byte[] classBytes)
                throws java.rmi.RemoteException
write Class locally SHOULD NOT BE USED EVENTUALLY
Specified by:
writeClass in interface PonderMC

loadAction

public void loadAction(PmcAction action)
                throws java.rmi.RemoteException
Loads a new PmcAction object in the PMC
Specified by:
loadAction in interface PonderMC
Parameters:
action - The PmcAction object to load

isActive

public boolean isActive()
A test method to return true or false depending on the status of this component

execAction

public boolean execAction(java.lang.String name,
                          java.util.LinkedList params)
Execute a local (loaded) Action
Parameters:
name - The name of the action to execute
params - The LinkedList of values (Object's) which are the parameters to the action
Returns:
True if the execution was successful. False otherwise

main

public static void main(java.lang.String[] args)
Name: main. Binds the PondecMCimpl to the RMI registry on the local machine
Parameters:
args - Runtime arguments