|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Session
This is the local Session interface which provides various methods which could be used with the started TDI Server.
Method Summary | |
---|---|
void |
addEventListener(DIEventListener aListener,
String aTypeFilter,
String aIdFilter)
Registers an Event Listener with the Session. |
void |
checkInAndLeaveCheckedOut(MetamergeConfig configuration,
String relativePathOrSolutionName)
Checks in the specified configuration and leaves it checked out. |
void |
checkInConfiguration(MetamergeConfig configuration,
String relativePathOrSolutionName)
Saves the specified configuration and releases the lock. |
void |
checkInConfiguration(MetamergeConfig configuration,
String relativePathOrSolutionName,
boolean encrypt)
Encrypts and saves the specified configuration and releases the lock. |
MetamergeConfig |
checkOutConfiguration(String relativePathOrSolutionName)
Checks out the specified configuration. |
MetamergeConfig |
checkOutConfiguration(String relativePathOrSolutionName,
String password)
Checks out the specified password protected configuration. |
ConfigInstance |
checkOutConfigurationAndLoad(String relativePathOrSolutionName)
Checks out the specified configuration and starts a temporary Config Instance on the Server. |
ConfigInstance |
checkOutConfigurationAndLoad(String relativePathOrSolutionName,
String password)
Checks out the specified configuration and starts a temporary Config Instance on the Server. |
ConfigInstance |
createNewConfigInstance(String aConfigUrl)
Deprecated. Not supported. Creates and starts a new Config Instance with an empty configuration. |
ConfigInstance |
createNewConfigInstance(String aConfigUrl,
String aPassword)
Deprecated. Not supported. Creates and starts a new Config Instance with an empty configuration. |
MetamergeConfig |
createNewConfiguration(String aRelativePath,
boolean aOverwrite)
Creates a new empty configuration and immediately checks it out. |
ConfigInstance |
createNewConfigurationAndLoad(String aRelativePath,
boolean aOverwrite)
Creates a new empty configuration, immediately checks it out and loads a temporary Config Instance on the Server. |
AssemblyLine[] |
getAssemblyLines()
Returns started AssemblyLines corresponding to the currently started configurations. |
String |
getConfigFolderPath()
Gets the value of the api.config.folder property as a complete path. |
ConfigInstance |
getConfigInstance(String aConfigId)
Returns configuration instance corresponding to a specific configuration ID. |
ConfigInstance[] |
getConfigInstances()
Returns all currently started configuration instances. |
EventHandler[] |
getEventHandlers()
Returns started EventHandlers corresponding to the currently started configurations. |
SecurityRegistry |
getSecurityRegistry()
Returns information about the restrictions the current user has. |
ServerInfo |
getServerInfo()
Retrieves the Server information. |
SystemLog |
getSystemLog()
Returns information about the System logging. |
SystemQueue |
getSystemQueue()
Gets the SystemQueue Server API object |
TombstoneManager |
getTombstoneManager()
Returns the TombstoneManager object. |
Object |
invokeCustom(String aCustomClassName,
String aMethodName,
Object[] aParams)
Invokes the specified method from the specified class. |
Object |
invokeCustom(String aCustomClassName,
String aMethodName,
Object[] aParamsValue,
String[] aParamsClass)
Invokes the specified method from the specified class. |
boolean |
isConfigurationCheckedOut(String relativePathOrSolutionName)
Checks if the specified configuration is checked out on the Server. |
boolean |
isSSLon()
Checks if current session is over SSL. |
ArrayList |
listAllConfigurations()
Returns a list all configurations in the directory subtree of the Server configuration codebase folder. |
ArrayList |
listConfigurations(String aRelativePath)
Returns a list of all configurations in the specified folder. |
ArrayList |
listFolders(String aRelativePath)
Returns a list of the child folders of the specified folder. |
boolean |
releaseConfigurationLock(String relativePathOrSolutionName)
Administratively releases the lock of the specified configuration. |
boolean |
removeEventListener(DIEventListener aListener)
Unregisters an Event Listener with the Session. |
void |
sendCustomNotification(String aType,
String aId,
Object aData)
Sends a custom, user defined notification to all registered listeners. |
void |
sendEventToACT(Serializable event)
Processes an event by the Active Correlation Technology engine of the TDI server. |
void |
shutDownServer()
Shuts down the ITDI server. |
void |
shutDownServer(int aExitCode)
Shuts down the TDI Server with the specified exit code. |
ConfigInstance |
startConfigInstance(String configPathOrSolutionName)
Starts a new Config Instance on the Server with the configuration given. |
ConfigInstance |
startConfigInstance(String configPathOrSolutionName,
boolean keepAlive,
String password)
Starts a new Config Instance on the Server with the configuration given. |
boolean |
undoCheckOut(String relativePathOrSolutionName)
Releases the lock on the specified configuration, thus aborting all changes being done. |
Method Detail |
---|
ServerInfo getServerInfo() throws DIException
DIException
- if an error occurs while retrieving the Server information.ConfigInstance[] getConfigInstances() throws DIException
DIException
- if an error occurs while retrieving the information
about the currently started configuration instances.ConfigInstance getConfigInstance(String aConfigId) throws DIException
aConfigId
- the ID of the wanted configuration.
DIException
- if an error occurs while retrieving the information.AssemblyLine[] getAssemblyLines() throws DIException
DIException
- if an error occurs while retrieving the information
about the AssemblyLines.EventHandler[] getEventHandlers() throws DIException
DIException
- if an error occurs while retrieving the information
about the EventHandlers.ConfigInstance startConfigInstance(String configPathOrSolutionName) throws DIException
configPathOrSolutionName
- The URL where the configuration file is loaded from or the
Solution Name of the configuration file.
Only configuration files located in the configuration codebase folder can be
referenced by Solution Name.
DIException
- if an error occurs on starting the new Config Instance.ConfigInstance startConfigInstance(String configPathOrSolutionName, boolean keepAlive, String password) throws DIException
configPathOrSolutionName
- The URL where the configuration file is loaded from or the
Solution Name of the configuration file.
Only configuration files located in the configuration codebase folder can be
referenced by Solution Name.keepAlive
- When true
the Config Instance will stay alive even
when no threads are running, when false
the Config Instance will automatically
terminate when its last thread terminates.password
- Specify the pasword of the conofiguration when it is password-protected; specify
null
when the configuration is not password-protected.
DIException
- if an error occurs on starting the new Config Instance.ConfigInstance createNewConfigInstance(String aConfigUrl) throws DIException
aConfigUrl
- The URL of the new configuration file to be created.
DIException
- if an error occurs while creating the new Config Instance.ConfigInstance createNewConfigInstance(String aConfigUrl, String aPassword) throws DIException
aConfigUrl
- The URL of the new configuration file to be created.aPassword
- If this parameter is not null
, the new configuration will
be protected with the given password.
DIException
- if an error occurs while creating the new Config Instance.void shutDownServer() throws DIException
DIException
- if an error occurs while shutting down the server.void shutDownServer(int aExitCode) throws DIException
aExitCode
- the exit code used to shut down TDI Server.
DIException
- if an error occurs while shutting down the server.SecurityRegistry getSecurityRegistry() throws DIException
DIException
- if an error occurs while retrieving security information.SystemLog getSystemLog() throws DIException
DIException
- if an error occurs while retrieving the System logging information.void addEventListener(DIEventListener aListener, String aTypeFilter, String aIdFilter) throws DIException
aListener
- The Event Listener to register with the Session.aTypeFilter
- A filter for the type of events.aIdFilter
- A filter for the id of events.
DIException
- if an error occurs while registering the listener.boolean removeEventListener(DIEventListener aListener) throws DIException
aListener
- The Event Listener to unregister.
DIException
- if an error occurs while unregistering the listener.TombstoneManager getTombstoneManager() throws DIException
DIException
- If an error occurs while getting the TombstoneManager.boolean isSSLon() throws DIException
DIException
- if an error occurs while retrieving the information.boolean releaseConfigurationLock(String relativePathOrSolutionName) throws DIException
relativePathOrSolutionName
- The path to the configuration relative to the Server configuration codebase
folder or the Solution Name of the configuration (the configuration must be inside the configuration codebase
folder).
DIException
- If an error occurs during releasing the lock.boolean undoCheckOut(String relativePathOrSolutionName) throws DIException
relativePathOrSolutionName
- The path to the configuration relative to the Server configuration codebase
folder or the Solution Name of the configuration (the configuration must be inside the configuration codebase
folder).
DIException
- If an error occurs during releasing the lock.ArrayList listConfigurations(String aRelativePath) throws DIException
aRelativePath
- A folder relative to the Server configuration codebase folder.
DIException
- If an error occurs while retrieving configurations.ArrayList listFolders(String aRelativePath) throws DIException
aRelativePath
- A folder relative to the Server configuration codebase folder.
DIException
- If an error occurs while retrieving child folder.ArrayList listAllConfigurations() throws DIException
DIException
- If an error occurs while retrieving configurations.MetamergeConfig checkOutConfiguration(String relativePathOrSolutionName) throws DIException
relativePathOrSolutionName
- The path to the configuration relative to the Server configuration codebase
folder or the Solution Name of the configuration (the configuration must be inside the configuration codebase
folder).
DIException
- If an error occurs while checking out the configuration.MetamergeConfig checkOutConfiguration(String relativePathOrSolutionName, String password) throws DIException
relativePathOrSolutionName
- The path to the configuration relative to the Server configuration codebase
folder or the Solution Name of the configuration (the configuration must be inside the configuration codebase
folder).password
- Specify the password for password protected configurations.
DIException
- If an error occurs while checking out the configuration.ConfigInstance checkOutConfigurationAndLoad(String relativePathOrSolutionName) throws DIException
relativePathOrSolutionName
- The path to the configuration relative to the Server configuration codebase
folder or the Solution Name of the configuration (the configuration must be inside the configuration codebase
folder).
DIException
- If an error occurs while checking out the configuration.ConfigInstance checkOutConfigurationAndLoad(String relativePathOrSolutionName, String password) throws DIException
relativePathOrSolutionName
- The path to the configuration relative to the Server configuration codebase
folder or the Solution Name of the configuration (the configuration must be inside the configuration codebase
folder).password
- Specify the password for password protected configurations.
DIException
- If an error occurs while checking out the configuration.void checkInConfiguration(MetamergeConfig configuration, String relativePathOrSolutionName) throws DIException
configuration
- The MetamergeConfig object representing the configuration to
be checked in.relativePathOrSolutionName
- The path to the configuration relative to the Server configuration codebase
folder or the Solution Name of the configuration (the configuration must be inside the configuration codebase
folder).
DIException
- If an error occurs while checking in the configuration.void checkInAndLeaveCheckedOut(MetamergeConfig configuration, String relativePathOrSolutionName) throws DIException
configuration
- The MetamergeConfig object representing the configuration to
be checked in.relativePathOrSolutionName
- The path to the configuration relative to the Server configuration codebase
folder or the Solution Name of the configuration (the configuration must be inside the configuration codebase
folder).
DIException
- If an error occurs while checking in the configuration.void checkInConfiguration(MetamergeConfig configuration, String relativePathOrSolutionName, boolean encrypt) throws DIException
configuration
- The MetamergeConfig object representing the configuration to
be checked in.relativePathOrSolutionName
- The path to the configuration relative to the Server configuration codebase
folder or the Solution Name of the configuration (the configuration must be inside the configuration codebase
folder).encrypt
- If set to true, the configuration will be encrypted on the Server.
DIException
- If an error occurs while checking in the configuration.MetamergeConfig createNewConfiguration(String aRelativePath, boolean aOverwrite) throws DIException
aRelativePath
- The path of the new configuration file relative to the Server
configuration codebase folder.aOverwrite
- Specify whether to overwrite or not an already exising configuration file.
DIException
- If an error occurs while creating the new configuration.ConfigInstance createNewConfigurationAndLoad(String aRelativePath, boolean aOverwrite) throws DIException
aRelativePath
- The path of the new configuration file relative to the Server
configuration codebase folder.aOverwrite
- Specify whether to overwrite or not an already exising configuration file.
DIException
- If an error occurs while creating the new configuration.boolean isConfigurationCheckedOut(String relativePathOrSolutionName) throws DIException
relativePathOrSolutionName
- The path to the configuration relative to the Server configuration codebase
folder or the Solution Name of the configuration (the configuration must be inside the configuration codebase
folder).
DIException
- If an error occurs while checking the configuration.void sendCustomNotification(String aType, String aId, Object aData) throws DIException
aType
- Notification type, will be automatically prefixed with "user."aId
- Notification ID, usually identifies the object this event originated from.aData
- Custom user data. Make sure the object passed is serializable if you want
to send this event notification in a remote context.
DIException
- If an error occurs while sending the notification.SystemQueue getSystemQueue() throws DIException
DIException
- if the System Queue is turned off or the System
Queue cannot be initializedString getConfigFolderPath()
Object invokeCustom(String aCustomClassName, String aMethodName, Object[] aParams) throws DIException
invokeCustom
method. The usage of this method can be turned on/off. There
is a property in the global.properties file called api.custom.method.invoke.on. If this
property is set to true then this method can be invoked, otherwise an exception is
thrown if this method is invoked. There is a restriction on the
classes which can be directly invoked. The allowed classes are described in another property in
the global.properties file called api.custom.method.invoke.allowed.classes. Only
classes listed in this property can be directly invoked by this method. If a user tries to
invoke a class which is not in this list then an exception is thrown.
aCustomClassName
- The class containing the method to be invoked.aMethodName
- The name of the method to be invoked.aParams
- Array of parameters used by the invoked method.
DIException
- If an error occurs while invoking the method.Object invokeCustom(String aCustomClassName, String aMethodName, Object[] aParamsValue, String[] aParamsClass) throws DIException
invokeCustom
methods
is that when using this method the user MUST specify the parameters' type.
The usage of this method can be turned on/off. There
is a property in the global.properties file called api.custom.method.invoke.on. If this
property is set to true then this method can be invoked, otherwise an exception is
thrown if this method is invoked. There is a restriction on the
classes which can be directly invoked. The allowed classes are described in another property in
the global.properties file called api.custom.method.invoke.allowed.classes. Only
classes listed in this property can be directly invoked by this method. If the user tries to
invoke a class which is not in this list then an exception is thrown.
aCustomClassName
- The class containing the method to be invoked.aMethodName
- The name of the method to be invoked.aParamsValue
- Array of parameters used by the invoked method.aParamsClass
- The type of the parameters used by the invoked method.
DIException
- If an error occurs while invoking the method.void sendEventToACT(Serializable event) throws DIException
event
- Event to be processed by ACT engine - currently only
org.eclipse.hyades.logging.events.cbe.CommonBaseEvent is supported.
DIException
- An error occurred while processing the event or the event type is not supported.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |