|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.api.APIEngine
public class APIEngine
This is the core class of the Server API. The APIEngine class does all initialization of the Server API. Both the local and the remote APIs are initialized by this class. During the initialization the values of the "api.*" properties in global.properties/solution.properties are used. This class provides methods which give access to a local session needed for using the local API.
Field Summary | |
---|---|
static int |
DEFAULT_REGISTRY_PORT
A constant containing the default port on which the RMI registry runs. |
static java.lang.String |
PROP_API_CUSTOM_AUTH
Property name used to specify the script file path used for the custom authentication. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_JAAS_VALUE
Possible value of the property PROP_API_CUSTOM_AUTH specifying
that the build-in JAAS authentication mechanism must be used. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_ADMIN_DN
Property name used to specify the LDAP Server administrator distinguished name that will be used for user searches. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_ADMIN_PASSWORD
Property name used to specify the password for the LDAP Server administrator distinguished name |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_BINARY_ATTRIBUTES
Property name used to specify a list of space-separated attribute names. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_CRITICAL
Property name used to mark the LDAP authentication as critical or not. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_GROUP_SEARCHBASE
Property name used to specify the LDAP directory context, where groups will be searched. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_GROUP_SUPPORT
Property name used to specify whether LDAP Group authentication is turned on. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_GROUPNAME_ATTRIBUTE
Property name used to specify the name of a group’s attribute in LDAP which corresponds to the way the group is named in the TDI User Registry. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_HOSTNAME
Property name that holds the host name of the LDAP server. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_PORT
Property name that holds the port of the LDAP server. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_SEARCHBASE
Property name used to specify the LDAP directory location where user searches will be performed. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_USE_SSL
Property name used to switch the usage of SSL on and off. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_USER_ATTRIBUTE
Property name used to specify the user id attribute to be used in searches. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_USERMEMBERSHIP_ATTRIBUTE
Property name used to specify the name of the attribute of a user in LDAP that contains a list of the groups of which the user is a member. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_USERMEMBERSHIP_ATTRIBUTE_CONTENT
Property name used to specify how groups are named in the membership attribute of a user. |
static java.lang.String |
PROP_API_CUSTOM_AUTH_LDAP_VALUE
Possible value of the property PROP_API_CUSTOM_AUTH specifying
that the build-in LDAP authentication mechanism must be used. |
static java.lang.String |
PROP_API_CUSTOM_METHOD_INVOKE
Property name used to switch the custom method invocation on and off. |
static java.lang.String |
PROP_API_CUSTOM_METHOD_INVOKE_ALLOWED_CLASSES
Property name used to specify the class names that could be invoked through Session.invokeCustom(String, String, Object[]) and
Session.invokeCustom(String, String, Object[], String[]) methods
of the Server API. |
static java.lang.String |
PROP_API_JMX_ON
Property name used to switch the local JMX interface on and off. |
static java.lang.String |
PROP_API_JMX_REMOTE_ON
Property name used to switch the remote JMX interface on and off. |
static java.lang.String |
PROP_API_NOTIFICATION_SUPPRESSED_TYPES
Property name used to specify a list of Server notification types, which will be suppressed. |
static java.lang.String |
PROP_API_ON
Property name used to switch the TDI local API on and off. |
static java.lang.String |
PROP_API_REMOTE_NAMING_PORT
Property name used to set the port the remote server API will listen on. |
static java.lang.String |
PROP_API_REMOTE_NONSSL_HOSTS
Property name used to specify the remote hosts that could use the remote API without SSL. |
static java.lang.String |
PROP_API_REMOTE_ON
Property name used to switch the TDI remote API on and off. |
static java.lang.String |
PROP_API_REMOTE_SSL_CLIENT_AUTH_ON
Property name used to switch the client authentication on and off. |
static java.lang.String |
PROP_API_REMOTE_SSL_ON
Property name used to switch the SSL for the remote API on and off. |
static java.lang.String |
PROP_API_USER_REGISTRY
Property name used to specify the path to the user registry. |
static java.lang.String |
PROP_API_USER_REGISTRY_ENCRYPTION_ON
Property name used to switch the user registry's encryption on and off. |
static java.lang.String |
PROP_TOMBSTONE_MANAGER_ON
Property name used to switch the TombStone manager on and off. |
static java.lang.String |
REMOTE_SESSION_FACTORY_NAME
This constant contains the name of the used for looking up the remote object required for establishing a session with the remote TDI Server. |
static java.lang.String |
TEMP_CONFIG_ID_PREFIX
This is the prefix for auto generated configuration ids for temporary configuration instances. |
Constructor Summary | |
---|---|
APIEngine()
|
Method Summary | |
---|---|
static void |
addEventListener(DIEventListener aListener,
java.lang.String aTypeFilter,
java.lang.String aIdFilter)
Adds a new event listener. |
static void |
assemblyLineStarted(AssemblyLine aAssemblyLine)
This is a notification method, that notifies the engine that the specified Assembly Line has been started. |
static void |
assemblyLineTerminated(AssemblyLine aAssemblyLine)
This is a notification method, that notifies the engine that the specified Assembly Line has been terminated. |
static void |
configInstanceStarted(RSInterface aConfigInstance)
This is a notification method, that notifies the engine that the specified Config Instance has been started. |
static void |
configInstanceStopped(RSInterface aConfigInstance)
This is a notification method, that notifies the engine that the specified Config Instance has been stopped. |
static java.util.Hashtable<RSInterface,java.util.Vector<AssemblyLine>> |
getAssemblyLines()
Returns a hashtable whose key elements are the Configuration Instances currently started, and the values are vectors containing all Assembly Lines currently started in the corresponding Configuration Instance. |
static APIAuthenticator |
getAuthenticator()
Retrieves the APIAuthenticator object. |
static java.rmi.server.RMIClientSocketFactory |
getClientSF()
Retrieves the client socket factory used for establishing remote connection. |
static java.lang.String |
getConfigId(RSInterface configInstance)
Obtain the configuration instance id for a running configuration instance. |
static RSInterface |
getConfigInstance(java.lang.String configId)
Retrieves config instance. |
static java.util.Vector<RSInterface> |
getConfigInstances()
Returns a vector containing all configuration instances currently started. |
static ConfigurationRegistry |
getConfigurationRegistry()
Retrieves config instance repository. |
static Identity |
getIdentity(java.lang.String aUserId)
Returns the Identity object from the Security Registry corresponding to the user id passes as parameter. |
static java.lang.String |
getInvokeClassesAllowed()
This methods returns a list of classes. |
static JAASAuthentication |
getJAASAuthenticator()
Getter for the member variable mJAASAuthenticator |
static LDAPAuthentication |
getLDAPAuthenticator()
Retrieves LDAP authenticator. |
static Session |
getLocalSession()
Creates a local Session object using a local SessionFactory created during the initialization. |
static Session |
getLocalSession(java.lang.String aUserName,
java.lang.String aPassword)
Creates a local Session object using a local SessionFactory created during the initialization. |
static boolean |
getMethodInvokeEnabled()
If method invocation is enabled, then this method returns true. |
static int |
getNamingPort()
Retrieves port number. |
static ResourceHash |
getResHash()
Returns the object logging TMS messages. |
static java.rmi.server.RMIServerSocketFactory |
getServerSF()
Retrieves server socket factory. |
static TombstoneManager |
getTombstoneManager()
Returns the TombstoneManager . |
static void |
initialize()
Initializes the Server API. |
static void |
initializeRemote()
Initializes the Server API for remote access. |
static java.rmi.registry.Registry |
initRMIRegistry()
Creates and initializes the RMI Registry. |
static boolean |
isDebugEnabled()
Returns "true" if debug is enabled and "false" otherwise. |
static boolean |
isJAASAuthenticationEnabled()
Checks if the member variable mJAASAuthenticator is initialized |
static boolean |
isLDAPAuthenticationEnabled()
Checks if LDAP authentication is enabled. |
static boolean |
isSSLClientAuthenticationOn()
Checks if SSL client authentication is on. |
static boolean |
isSSLon()
Checks if SSL is on. |
static void |
logDebug(java.lang.String aMessage)
Logs a message using the DEBUG log level. |
static void |
logError(java.lang.String aMessage)
Logs a message using the ERROR log level. |
static void |
logError(java.lang.String message,
java.lang.Throwable t)
Logs a message using the ERROR log level. |
static void |
logErrorAndThrowException(java.lang.String aErrorMsg)
Logs a message using the ERROR log level and then throws a DIException using the same message. |
static void |
logErrorAndThrowException(java.lang.String aErrorMsg,
java.lang.Throwable e)
Logs a message composed from the message passes as parameter and the message in the Throwable object. |
static void |
logFatal(java.lang.String aMessage)
Logs a message using the FATAL log level. |
static void |
logInfo(java.lang.String aMessage)
Logs a message using the INFO log level. |
static void |
logWarn(java.lang.String aMessage)
Logs a message using the WARN log level. |
static boolean |
removeEventListener(DIEventListener aListener)
Removes existing event listener. |
static void |
sendCustomNotification(java.lang.String aType,
java.lang.String aId,
java.lang.Object aData)
Sends a custom notification event using the API Engine's Event Notifier. |
static void |
sendNotification(java.lang.String type,
java.lang.String id,
java.lang.Object data,
java.lang.String configInstanceId)
Sends a notification event using the API Engine's Event Notifier. |
static void |
serverStopped(long aServerStarted)
This is a notification method, that notifies the engine that server has been stopped. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_API_ON
public static final java.lang.String PROP_API_USER_REGISTRY
public static final java.lang.String PROP_API_USER_REGISTRY_ENCRYPTION_ON
public static final java.lang.String PROP_API_REMOTE_ON
public static final java.lang.String PROP_API_REMOTE_NAMING_PORT
public static final java.lang.String PROP_API_REMOTE_SSL_ON
public static final java.lang.String PROP_API_REMOTE_SSL_CLIENT_AUTH_ON
public static final java.lang.String PROP_API_REMOTE_NONSSL_HOSTS
public static final java.lang.String PROP_API_JMX_ON
public static final java.lang.String PROP_API_JMX_REMOTE_ON
public static final java.lang.String PROP_TOMBSTONE_MANAGER_ON
public static final java.lang.String PROP_API_CUSTOM_AUTH
public static final java.lang.String PROP_API_CUSTOM_METHOD_INVOKE
public static final java.lang.String PROP_API_CUSTOM_METHOD_INVOKE_ALLOWED_CLASSES
Session.invokeCustom(String, String, Object[])
and
Session.invokeCustom(String, String, Object[], String[])
methods
of the Server API. The names could be separated by the characters " ",
"," or ";"
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_CRITICAL
true
then the error that occurred while
authenticating will be thrown as exception, otherwise it will only be
logged as an error and no exception will be thrown.
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_HOSTNAME
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_PORT
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_USE_SSL
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_SEARCHBASE
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_ADMIN_DN
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_ADMIN_PASSWORD
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_USER_ATTRIBUTE
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_GROUP_SUPPORT
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_USERMEMBERSHIP_ATTRIBUTE
PROP_API_CUSTOM_AUTH_LDAP_GROUP_SUPPORT
is set to true.
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_USERMEMBERSHIP_ATTRIBUTE_CONTENT
PROP_API_CUSTOM_AUTH_LDAP_GROUP_SUPPORT
is set to true.
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_GROUPNAME_ATTRIBUTE
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_GROUP_SEARCHBASE
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_BINARY_ATTRIBUTES
public static final java.lang.String PROP_API_CUSTOM_AUTH_LDAP_VALUE
PROP_API_CUSTOM_AUTH
specifying
that the build-in LDAP authentication mechanism must be used.
public static final java.lang.String PROP_API_CUSTOM_AUTH_JAAS_VALUE
PROP_API_CUSTOM_AUTH
specifying
that the build-in JAAS authentication mechanism must be used.
public static final java.lang.String PROP_API_NOTIFICATION_SUPPRESSED_TYPES
public static final int DEFAULT_REGISTRY_PORT
PROP_API_REMOTE_NAMING_PORT
is not set.
public static final java.lang.String REMOTE_SESSION_FACTORY_NAME
public static final java.lang.String TEMP_CONFIG_ID_PREFIX
Session.startTempConfigInstance(String, boolean, String, String)
,
Constant Field ValuesConstructor Detail |
---|
public APIEngine()
Method Detail |
---|
public static ResourceHash getResHash()
public static void initialize() throws DIException
DIException
- in case an initialization error occurs.public static Session getLocalSession() throws DIException
DIException
- if the API Engine is not initialized or an error occurs while
obtaining the session.public static Session getLocalSession(java.lang.String aUserName, java.lang.String aPassword) throws DIException
aUserName
- the username to use in the authentication process.aPassword
- the password to use in the authentication process.
DIException
- if the API Engine is not initialized or an error occurs while
obtaining the session.public static void initializeRemote() throws DIException
DIException
- if the initialize()
was not called yet or the call
did not succeed.public static void configInstanceStarted(RSInterface aConfigInstance) throws DIException
aConfigInstance
- the started config instance object.
DIException
- if an error while broadcasting the notification occurs.public static void configInstanceStopped(RSInterface aConfigInstance) throws DIException
aConfigInstance
- the stoped config instance object.
DIException
- if an error while broadcasting the notification occurs.public static void assemblyLineStarted(AssemblyLine aAssemblyLine) throws DIException
aAssemblyLine
- the started AssemblyLine instance.
DIException
public static void assemblyLineTerminated(AssemblyLine aAssemblyLine)
aAssemblyLine
- the stopped AssemblyLine instance.public static void serverStopped(long aServerStarted) throws DIException
aServerStarted
- the time the server was stopped.
DIException
- if an error while broadcasting the notification occurs.public static java.util.Vector<RSInterface> getConfigInstances() throws DIException
DIException
- if the API Engine is not initialized correctly or error
occurs while retrieving the list.public static RSInterface getConfigInstance(java.lang.String configId) throws DIException
configId
- configuration instance id
DIException
- if the Server API is not initializedpublic static java.util.Hashtable<RSInterface,java.util.Vector<AssemblyLine>> getAssemblyLines() throws DIException
DIException
- if the Server API is not initialized, or an error occurs.public static Identity getIdentity(java.lang.String aUserId) throws DIException
aUserId
- the user identifier used when obtaining the Identity
Identity
object
DIException
- if the API Engine is not initialized properly.public static void addEventListener(DIEventListener aListener, java.lang.String aTypeFilter, java.lang.String aIdFilter) throws DIException
aListener
- this is the concrete object that implements the
DIEventListener
interface.aTypeFilter
- a composite filter that matches event typeaIdFilter
- an atomic filter that matches event id
DIException
- if the API Engine is not initialized properly, or other error
occurs.public static boolean removeEventListener(DIEventListener aListener) throws DIException
aListener
- the listener to remove.
DIException
- if the API Engine is not initialized properly, or other error
occurs.public static boolean isDebugEnabled()
public static void logDebug(java.lang.String aMessage)
aMessage
- the message to log.public static void logInfo(java.lang.String aMessage)
aMessage
- the message to log.public static void logError(java.lang.String aMessage)
aMessage
- the message to log.public static void logError(java.lang.String message, java.lang.Throwable t)
message
- the message to log.t
- Error object.public static void logWarn(java.lang.String aMessage)
aMessage
- the message to log.public static void logFatal(java.lang.String aMessage)
aMessage
- the message to log.public static void logErrorAndThrowException(java.lang.String aErrorMsg) throws DIException
aErrorMsg
- the error message to output wit the exception.
DIException
- with the specified error message.public static void logErrorAndThrowException(java.lang.String aErrorMsg, java.lang.Throwable e) throws DIException
Throwable
object. The new message is logged using
the ERROR log level and then a DIException is thrown containing that
message.
aErrorMsg
- the error messagee
- the Throwable object
DIException
- with the specified error message.public static int getNamingPort()
public static boolean isSSLon()
true
if SSL has been turned on. Otherwise returns
false
.public static boolean isSSLClientAuthenticationOn()
true
if SSL Client Authentication is on. Otherwise
returns false
.public static java.rmi.server.RMIServerSocketFactory getServerSF()
public static java.rmi.server.RMIClientSocketFactory getClientSF()
public static java.rmi.registry.Registry initRMIRegistry() throws DIException
DIException
- if an error occurs.public static TombstoneManager getTombstoneManager()
TombstoneManager
.
TombstoneManager
object.public static ConfigurationRegistry getConfigurationRegistry()
ConfigurationRegistry
object.public static APIAuthenticator getAuthenticator()
APIAuthenticator
object.
APIAuthenticator
object.public static void sendCustomNotification(java.lang.String aType, java.lang.String aId, java.lang.Object aData) throws DIException
aType
- the type of the event that had occurred. DIEvent.EVT_CI_START
DIEvent.EVT_CI_STOP
DIEvent.EVT_CI_UPDATED
DIEvent.EVT_AL_START
DIEvent.EVT_AL_STOP
DIEvent.EVT_SRV_STOP
aId
- the ID of the event Note: This ID should not to be
think of as a Unique Identifier used for distinguishing
different events occurring in the system.aData
- the additional information this event carrier might contain.
DIException
- if the aType
parameter is null
.public static LDAPAuthentication getLDAPAuthenticator()
null
.public static boolean isLDAPAuthenticationEnabled()
true
if LDAP Authentication is enabled,
false
otherwise.public static boolean getMethodInvokeEnabled()
public static java.lang.String getInvokeClassesAllowed()
Session.invokeCustom(String, String, Object[])
and the
Session.invokeCustom(String, String, Object[], String[])
methods
of the Server API.
public static java.lang.String getConfigId(RSInterface configInstance)
configInstance
- A running configuration instance.
public static JAASAuthentication getJAASAuthenticator()
public static boolean isJAASAuthenticationEnabled()
public static void sendNotification(java.lang.String type, java.lang.String id, java.lang.Object data, java.lang.String configInstanceId) throws DIException
type
- Type of the notification event.id
- ID of the notification event.data
- An Java object containing additional useful information. By
audit notification this object is of type com.ibm.di.Entry
containing as Attributes specific audit information.configInstanceId
- The ConfigInstance ID, which the notification is bound to.
DIException
- If an error occurs while the event is transmitted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |