com.netscape.pm.model
Interface IPMCluster

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface IPMCluster
extends javax.ejb.EJBObject, java.rmi.Remote

This interface defines a cluster in Process Manager. Process Manager 6.0 only contains one cluster. The methods in this interface are used to

  1. change properties of a cluster,
  2. get properties of a cluster,
  3. synchronize this cluster bean with the configuration directory,
  4. log messages to the cluster
  5. get log messages from the cluster

See Also:
IPMClusterHome, EJBObject, Remote

Field Summary
static java.lang.String DEFAULT
          The name which is used to look up the default cluster.
static java.lang.String DEFAULT_CLUSTER_NAME
          The default cluster name
static java.lang.String DEFAULT_JNDI_ROOT
          The JNDI root for the default cluster.
static java.lang.String VERSION
          The version of the Process Manager.
 
Method Summary
 void changeCluster(IPMClusterProperty prop)
          Changes properties of a cluster.
 IPMApplication getApplication(java.lang.String appName)
          Gets a particular Process Manager application.
 java.lang.String getApplicationsPath()
          Gets the directory under which Process Manager applications reside in the file system.
 java.lang.String getClasspath()
          Gets the classpath of Process Manager.
 IPMClusterProperty getClusterProperty()
          Gets the cluster property object for this cluster.
 java.sql.Connection getConnection()
          Gets the connection object for the cluster.
 ICorporateDirectory getCorporateDirectory()
          Gets the corporate directory for the Process Manager cluster.
 IDeploymentManager getDeploymentManager()
          Gets the deployment manager object for this cluster.
 IFinder getFinder()
          Gets the Finder object for this cluster.
 java.lang.String getHomePath()
          Gets the directory which is the home for Process Manager.
 java.util.Hashtable getInstalledApplications()
          Gets a hashtable of applications that are installed in the Process Manager cluster.
 java.util.Vector getLog(int logType, int size)
          Gets the log of a particular type from the cluster.
 IPMIDManager getPMIDManager()
          Gets the PMIDManager object for this cluster.
 IRoleCache getRoleCache()
          Gets the role cache object for this cluster.
 java.lang.String getTempPath()
          Gets the directory which is used as scratch pad inside Process Manager.
 java.lang.String getVersion()
          Gets the version of the Process Manager cluster.
 boolean isDefined()
          Indicates whether the cluster has been defined or not.
 void log(java.lang.Exception e)
          Logs an exception into the cluster logs of Process Manager.
 void synchronize()
          Synchronizes the Process Manager cluster with the configuration directory.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Field Detail

DEFAULT_JNDI_ROOT

public static final java.lang.String DEFAULT_JNDI_ROOT
The JNDI root for the default cluster.
Since:
PM6.0

DEFAULT_CLUSTER_NAME

public static final java.lang.String DEFAULT_CLUSTER_NAME
The default cluster name
Since:
PM6.0

DEFAULT

public static final java.lang.String DEFAULT
The name which is used to look up the default cluster.
Since:
PM6.0

VERSION

public static final java.lang.String VERSION
The version of the Process Manager.
Since:
PM6.0
Method Detail

changeCluster

public void changeCluster(IPMClusterProperty prop)
                   throws java.rmi.RemoteException,
                          PMException
Changes properties of a cluster. There are only some properties that should be changed in a cluster. These are as follows:

  1. IPMClusterProperty.PRETTY_NAME
  2. IPMClusterProperty.DESCRIPTION
  3. IPMClusterProperty.CORPORATE_DIRECTORY_SERVER
  4. IPMClusterProperty.CORPORATE_DIRECTORY_PORT
  5. IPMClusterProperty.CORPORATE_DIRECTORY_BASE
  6. IPMClusterProperty.CORPORATE_DIRECTORY_BIND_DN
  7. IPMClusterProperty.CORPORATE_DIRECTORY_BIND_DN_PASSWORD
  8. IPMClusterProperty.SMTP_SERVER
  9. IPMClusterProperty.SMTP_PORT
  10. IPMClusterProperty.SMTP_REPLY_TO
  11. IPMClusterProperty.EVENT_USER
  12. IPMClusterProperty.EVENT_USER_PASSWORD
The following code example shows how the cluster properties can be changed.
 javax.naming.Context cxt = new javax.naming.InitialContext();
 String jndiName = "java:comp/env/" + IPMClusterManager.JNDI_ROOT;
 IPMClusterManagerHome home = (IPMClusterManagerHome) cxt.lookup( jndiName );
 IPMClusterManager clManager = home.create();
 IPMCluster pmc = clManger.getCluster ( IPMCluster.DEFAULT ) ;
 IPMClusterProperty prop = PMClusterPropertyFactory.create ( ) ;
 // set various methods of the prop variable by calling the setValue() method 
 // on the IPMClusterProperty interface 
 ....
 ...
 // call changeCluster()
 pmc.changeCluster ( prop ) ;
 
Parameters:
prop - The IPMClusterProperty that will be used to change the properties of the cluster
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM 6.0
See Also:
IPMClusterProperty

getVersion

public java.lang.String getVersion()
                            throws java.rmi.RemoteException,
                                   PMException
Gets the version of the Process Manager cluster.
Returns:
The version of the Process Manager cluster
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM 6.0

isDefined

public boolean isDefined()
                  throws java.rmi.RemoteException,
                         PMException
Indicates whether the cluster has been defined or not.
Returns:
true if the cluster is defined and false if it is not.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0

getClasspath

public java.lang.String getClasspath()
                              throws java.rmi.RemoteException,
                                     PMException
Gets the classpath of Process Manager. Typically this is $PM_HOME/classes where $PM_HOME is the directory where Process Manager is installed.
Returns:
The classpath for Process Manager classes.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0

getTempPath

public java.lang.String getTempPath()
                             throws java.rmi.RemoteException,
                                    PMException
Gets the directory which is used as scratch pad inside Process Manager. Typically this is $PM_HOME/temp where $PM_HOME is the directory where Process Manager is installed.
Returns:
The directory path.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0

getHomePath

public java.lang.String getHomePath()
                             throws java.rmi.RemoteException,
                                    PMException
Gets the directory which is the home for Process Manager. Typically this is $PM_HOME where $PM_HOME is the directory where Process Manager is installed.
Returns:
The directory path which is the home for Process Manager
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0

getApplicationsPath

public java.lang.String getApplicationsPath()
                                     throws java.rmi.RemoteException,
                                            PMException
Gets the directory under which Process Manager applications reside in the file system. Typically this is $PM_HOME/applications where $PM_HOME is the directory where Process Manager is installed. Each application, once deployed, has a separate directory under $PM_HOME/applications.
Returns:
The directory path for applications of Process Manager.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0

synchronize

public void synchronize()
                 throws java.rmi.RemoteException,
                        PMException
Synchronizes the Process Manager cluster with the configuration directory. This is an expensive call in terms of processing time and should only be called when absolutely necessary. This method reads the configuration directory and re-initializes all in-memory objects with the latest information from the configuration directory.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0

getApplication

public IPMApplication getApplication(java.lang.String appName)
                              throws java.rmi.RemoteException,
                                     PMException
Gets a particular Process Manager application.
Parameters:
appName - The name of the application which is to be looked up.
Returns:
com.netscape.pm.model.IPMApplication The remote interface of the application bean.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
IPMApplication

getInstalledApplications

public java.util.Hashtable getInstalledApplications()
                                             throws java.rmi.RemoteException,
                                                    PMException
Gets a hashtable of applications that are installed in the Process Manager cluster. The hashtable is keyed with the name of each application. The elements against each key is the deployment descriptor for that application.
Returns:
A hashtable of applications that are currently installed in the cluster.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
IDeploymentDescriptor, IDeploymentManager

getCorporateDirectory

public ICorporateDirectory getCorporateDirectory()
                                          throws java.rmi.RemoteException,
                                                 PMException
Gets the corporate directory for the Process Manager cluster.
Returns:
The corporate directory interface for this cluster.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
ICorporateDirectory

getRoleCache

public IRoleCache getRoleCache()
                        throws java.rmi.RemoteException,
                               PMException
Gets the role cache object for this cluster.
Returns:
The role cache interface for the cluster.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
IRoleCache

getPMIDManager

public IPMIDManager getPMIDManager()
                            throws java.rmi.RemoteException,
                                   PMException
Gets the PMIDManager object for this cluster.
Returns:
The PMIDManager interface for this cluster
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
IPMIDManager

getFinder

public IFinder getFinder()
                  throws java.rmi.RemoteException,
                         PMException
Gets the Finder object for this cluster.
Returns:
The Finder interface for the Process Manager cluster.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
IFinder

getDeploymentManager

public IDeploymentManager getDeploymentManager()
                                        throws java.rmi.RemoteException,
                                               PMException
Gets the deployment manager object for this cluster.
Returns:
The deployment manager interface for the Process Manager cluster.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
com.netscape.pm.model.IDeploymentManager

getClusterProperty

public IPMClusterProperty getClusterProperty()
                                      throws java.rmi.RemoteException,
                                             PMException
Gets the cluster property object for this cluster.
Returns:
The IPMClusterProperty interface for the Process Manager cluster.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
IPMClusterProperty

log

public void log(java.lang.Exception e)
         throws java.rmi.RemoteException,
                PMException
Logs an exception into the cluster logs of Process Manager.
Parameters:
java.lang.Exception - This parameter can also be a com.netscape.pm.model.PMException.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
PMException

getLog

public java.util.Vector getLog(int logType,
                               int size)
                        throws java.rmi.RemoteException,
                               PMException
Gets the log of a particular type from the cluster.
Parameters:
logType - This parameter should be set to one of three following types
  1. IPMClusterProperty.LOG_INFORMATION
  2. IPMClusterProperty.LOG_ERROR
  3. IPMClusterProperty.LOG_SECURITY
size - This specifies the number of log entries that the cluster should return. In order to get back the entire log, this parameter should be set to IPMClusterProperty.MAX_LOG_SIZE.
Returns:
Returns a vector of log objects
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
IPMClusterProperty

getConnection

public java.sql.Connection getConnection()
                                  throws java.rmi.RemoteException,
                                         PMException
Gets the connection object for the cluster.
Returns:
The java.sql.Connection object for the cluster.
Throws:
PMException - An application level exception thrown by Process Manager.
java.rmi.RemoteException - A remote exception thrown by the container.
Since:
PM6.0
See Also:
Connection