ponderEnforcement
Class RefrainControlObjectImpl

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--ponderEnforcement.RefrainControlObjectImpl
All Implemented Interfaces:
BasicPolControlObject, ControlObject, ORControlObject, RefrainControlObject, java.rmi.Remote, java.io.Serializable

public class RefrainControlObjectImpl
extends java.rmi.server.UnicastRemoteObject
implements RefrainControlObject, ORControlObject

Function: The Implementation of the Refrain Control Object

See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface ponderEnforcement.ControlObject
DORMANT, ENABLED, LOADED
 
Constructor Summary
RefrainControlObjectImpl(RefrainI newRefrain, byte[] newClassBytes, java.lang.String newName, java.lang.String newTypeName, java.lang.String newTypePath)
          Constructor
 
Method Summary
 PonderMC connectToPmc(java.lang.String pmcDirName)
          Connect to PMC
 void disable()
          disable
 void domainChange(PonderMC pmc, java.lang.String pmcDn, boolean added)
          Indicates a change in a domain which affects the subject domain of the policy
 void enable()
          enable
 java.lang.String getDomainPath()
          return the domain path of the policy Object of this control object
 byte[] getJavaBytecode()
          get the Java ByteCodes for the User-defined Policy Object
 java.lang.String getName()
          return the name of the policy Object of this control object
 BasicPolicyI getPolicyObject()
          get the Policy object
 int getStatus()
          get the Status of the object (policy-life-cycle!)
 java.lang.String getTypeName()
          return the name of the type from which the policy Object of this this control object is instantiated
 java.lang.String getTypePath()
          return the domain path of the type from which the policy Object for this control object is instantiated
 void load()
          load
 void parentChange(java.lang.String objDn, boolean refToDomain)
          Indicates a change in a domain which affects the subject domain of the policy.
 void setPolicyObject(RefrainI newRefrain)
          Set the corresponding PolicyObject
 void setStatus(int newStatus)
          set the Status of the object (policy-life-cycle!)
 void unload()
          unload
 
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

RefrainControlObjectImpl

public RefrainControlObjectImpl(RefrainI newRefrain,
                                byte[] newClassBytes,
                                java.lang.String newName,
                                java.lang.String newTypeName,
                                java.lang.String newTypePath)
                         throws java.rmi.RemoteException
Constructor
Method Detail

getStatus

public int getStatus()
              throws java.rmi.RemoteException
get the Status of the object (policy-life-cycle!)
Specified by:
getStatus in interface ControlObject

setStatus

public void setStatus(int newStatus)
               throws java.rmi.RemoteException
set the Status of the object (policy-life-cycle!)
Specified by:
setStatus in interface ControlObject

setPolicyObject

public void setPolicyObject(RefrainI newRefrain)
                     throws java.rmi.RemoteException
Set the corresponding PolicyObject
Specified by:
setPolicyObject in interface RefrainControlObject

load

public void load()
          throws java.rmi.RemoteException,
                 ControlObjectException
load
Specified by:
load in interface ControlObject

unload

public void unload()
            throws java.rmi.RemoteException,
                   ControlObjectException
unload
Specified by:
unload in interface ControlObject

enable

public void enable()
            throws java.rmi.RemoteException,
                   ControlObjectException
enable
Specified by:
enable in interface ControlObject

disable

public void disable()
             throws java.rmi.RemoteException,
                    ControlObjectException
disable
Specified by:
disable in interface ControlObject

domainChange

public void domainChange(PonderMC pmc,
                         java.lang.String pmcDn,
                         boolean added)
                  throws java.rmi.RemoteException
Indicates a change in a domain which affects the subject domain of the policy
Specified by:
domainChange in interface ORControlObject
Parameters:
pmc - The PonderMC which was added or removed
pmcDn - The PonderMC DN with which it is bound to the directory
added - If true it means that the object was added. If false it means that the object was removed

parentChange

public void parentChange(java.lang.String objDn,
                         boolean refToDomain)
                  throws java.rmi.RemoteException
Indicates a change in a domain which affects the subject domain of the policy. This method is used to indicate the addition or removal of a parent to an object in the subject domain of the policy
Specified by:
parentChange in interface ORControlObject
Parameters:
objDn - The DN of the object which had a new parent added or a parent removed. Used only for the case when it is a domain
refToDomain - If true it means that the parent was pointing to a domain object

getPolicyObject

public BasicPolicyI getPolicyObject()
                             throws java.rmi.RemoteException
get the Policy object
Specified by:
getPolicyObject in interface BasicPolControlObject

getJavaBytecode

public byte[] getJavaBytecode()
                       throws java.rmi.RemoteException
get the Java ByteCodes for the User-defined Policy Object
Specified by:
getJavaBytecode in interface BasicPolControlObject

getName

public java.lang.String getName()
                         throws java.rmi.RemoteException
return the name of the policy Object of this control object
Specified by:
getName in interface ControlObject

getDomainPath

public java.lang.String getDomainPath()
                               throws java.rmi.RemoteException
return the domain path of the policy Object of this control object
Specified by:
getDomainPath in interface ControlObject

getTypeName

public java.lang.String getTypeName()
                             throws java.rmi.RemoteException
return the name of the type from which the policy Object of this this control object is instantiated
Specified by:
getTypeName in interface ControlObject

getTypePath

public java.lang.String getTypePath()
                             throws java.rmi.RemoteException
return the domain path of the type from which the policy Object for this control object is instantiated
Specified by:
getTypePath in interface ControlObject

connectToPmc

public PonderMC connectToPmc(java.lang.String pmcDirName)
Connect to PMC