com.ibm.sysmgt.sdk.remote
Class DirectorServer

java.lang.Object
  extended bycom.ibm.sysmgt.sdk.remote.DirectorServer

public class DirectorServer
extends java.lang.Object

This the the Management Server. It is used to: - Allow connectivity to the Director Server via LoginSessions - Checking server preferences - Checking the status of the Director Server itself.


Nested Class Summary
 class DirectorServer.RemoteImplSessionCollection
           
 
Field Summary
static int DIRECTOR_SERVER_STATUS_ACTIVE
           
static int DIRECTOR_SERVER_STATUS_FAILED
           
static int DIRECTOR_SERVER_STATUS_INACTIVE
           
static int INVALID_USERID
          user type from createLoginSession result indicates user ID couldn't be validated
static int VALID_SUPERUSERID_PASSWORD
          user type from createLoginSession result indicates user ID valid as superuser
static int VALID_USERID_PASSWORD
          user type from createLoginSession result indicates user ID valid
 
Constructor Summary
DirectorServer(java.lang.String serverAddress)
          The constructor for DirectorServer NOTE: the current implementation has a limitation that the RemoteSdk client software and the Director Server must be running on the same machine.
 
Method Summary
 LoginSession createLoginSession(java.lang.String user, java.lang.String password, java.util.Locale locale)
          createLoginSession The first thing to do once a DirectorServer object is created is to create a longin session.
 void disconnect(LoginSession s)
          disconnect - disconnect
static boolean EnableTrace(boolean b)
          EnableTrace - Method to turn on tracing for the client side of RemoteLib.
 java.lang.String getHostname(LoginSession s)
           
 java.lang.String getIPAddress(LoginSession s)
           
static java.util.List getKnownManagers()
          getKnownManagers
 java.lang.String getOperatingSystemName(LoginSession s)
          getOperatingSystemName
 java.lang.String getProductName(LoginSession s)
          getProductName
 java.lang.String getProductVersion(LoginSession s)
          getProductVersion
static DirectorServer getServer(java.lang.String serverAddr)
          getServer
 java.lang.String getServerAddress()
          getServerAddress
 int getServerStatus(LoginSession s)
          getServerStatus
 int getUserType()
          Returns the user ID type of the Director user
 boolean isDirectorServerRunning(LoginSession s)
          isDirectorServerRunning Returns true if the Director Server service is running
 boolean isManagerActive(LoginSession s)
          isManagerActive
 boolean isRemoteSdkActive(LoginSession s)
          isDirectorServerRunning Returns true if the Director Server service is running and the RemoteSdkExtension is installed on the Director Server.
 void setUserType(int userType)
          Sets the user ID type of the Director user - ignores invalid user types
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALID_USERID_PASSWORD

public static final int VALID_USERID_PASSWORD
user type from createLoginSession result indicates user ID valid


VALID_SUPERUSERID_PASSWORD

public static final int VALID_SUPERUSERID_PASSWORD
user type from createLoginSession result indicates user ID valid as superuser


INVALID_USERID

public static final int INVALID_USERID
user type from createLoginSession result indicates user ID couldn't be validated


DIRECTOR_SERVER_STATUS_ACTIVE

public static final int DIRECTOR_SERVER_STATUS_ACTIVE
See Also:
Constant Field Values

DIRECTOR_SERVER_STATUS_INACTIVE

public static final int DIRECTOR_SERVER_STATUS_INACTIVE
See Also:
Constant Field Values

DIRECTOR_SERVER_STATUS_FAILED

public static final int DIRECTOR_SERVER_STATUS_FAILED
See Also:
Constant Field Values
Constructor Detail

DirectorServer

public DirectorServer(java.lang.String serverAddress)
               throws UnknownManagerException
The constructor for DirectorServer NOTE: the current implementation has a limitation that the RemoteSdk client software and the Director Server must be running on the same machine.

Parameters:
serverAddress - - IP address of the Director Server machine.
Throws:
UnknownManagerException
Method Detail

EnableTrace

public static boolean EnableTrace(boolean b)
EnableTrace - Method to turn on tracing for the client side of RemoteLib.

Parameters:
b - - true turns tracing on, false turns it off.
Returns:
The new value for tracing.

disconnect

public void disconnect(LoginSession s)
disconnect - disconnect

Parameters:
s - - LoginSession

getServer

public static DirectorServer getServer(java.lang.String serverAddr)
                                throws UnknownManagerException
getServer

Parameters:
serverAddr -
Throws:
UnknownManagerException

isManagerActive

public boolean isManagerActive(LoginSession s)
isManagerActive

Parameters:
s - - LoginSession Returns true if the Director Management Server process is ready to handle RemoteSdkRequests.

isDirectorServerRunning

public boolean isDirectorServerRunning(LoginSession s)
isDirectorServerRunning Returns true if the Director Server service is running

Parameters:
s -
Returns:

isRemoteSdkActive

public boolean isRemoteSdkActive(LoginSession s)
isDirectorServerRunning Returns true if the Director Server service is running and the RemoteSdkExtension is installed on the Director Server.

Parameters:
s -
Returns:

getServerStatus

public int getServerStatus(LoginSession s)
getServerStatus

Parameters:
s - - LoginSession

getOperatingSystemName

public java.lang.String getOperatingSystemName(LoginSession s)
getOperatingSystemName

Parameters:
s - - LoginSession

getProductName

public java.lang.String getProductName(LoginSession s)
getProductName

Parameters:
s - - LoginSession

getProductVersion

public java.lang.String getProductVersion(LoginSession s)
getProductVersion

Parameters:
s - - LoginSession

getHostname

public java.lang.String getHostname(LoginSession s)

getIPAddress

public java.lang.String getIPAddress(LoginSession s)

createLoginSession

public LoginSession createLoginSession(java.lang.String user,
                                       java.lang.String password,
                                       java.util.Locale locale)
                                throws AuthenticationFailureException,
                                       ServerCommunicationException
createLoginSession The first thing to do once a DirectorServer object is created is to create a longin session. The login session is required for all RemoteSdk requests which require interaction with the Director Server.

Parameters:
user - the user name or id
password - the password for the user id
locale - the locale
Throws:
AuthenticationFailureException - - the user id or password is not valid
ServerCommunicationException - - cannot communicate with the remote library server

getUserType

public int getUserType()
Returns the user ID type of the Director user

Returns:
userType - the type of Director user

setUserType

public void setUserType(int userType)
Sets the user ID type of the Director user - ignores invalid user types

Parameters:
userType - - the userType -- must be either DirectorServer.VALID_USERID_PASSWORD, DirectorServer.VALID_SUPERUSERID_PASSWORD, DirectorServer.INVALID_USERID

getKnownManagers

public static java.util.List getKnownManagers()
getKnownManagers


toString

public java.lang.String toString()

getServerAddress

public java.lang.String getServerAddress()
getServerAddress

Returns: