|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.ibm.di.server.RS
public class RS
This is the main TDI class that forks off new threads to run AssemblyLines and EventHandlers.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static String |
CL_AL_DEBUG
|
static String |
CL_CONFIG
|
static String |
CL_CONFIG_DRIVER
|
static String |
CL_CONFIG_ENCODING
|
static String |
CL_CONFIG_STDIN
|
static String |
CL_DEBUG_OPTIONS
|
static String |
CL_DEBUG_PORT
|
static String |
CL_DISABLE_REMOTE_API
|
static String |
CL_DUMP_PERFPROPS
|
static String |
CL_DUMP_PROPS
|
static String |
CL_EH_DEBUG
|
static String |
CL_EXECUTE_SCRIPT
|
static String |
CL_EXT_PROP_FILE
|
static String |
CL_FORCE_RESET_CHECKPOINT
|
static String |
CL_IGNORE_GLOBAL_PROPERTIES
if this option is specified, the server will not read global.properties; solution.properties will still be read if present |
static String |
CL_INTERNAL_CONFIG_NSTANCE_NAME
This is not a command line option but an internal parameter that lets you start a Config Instance with a name different than the config file name. |
static String |
CL_LOGFILE
|
static String |
CL_NO_AUTOSTART
|
static String |
CL_NO_TERMINATE
|
static String |
CL_PASSWORD
|
static String |
CL_RUN_DAEMON
|
static String |
CL_RUN_MODE
|
static String |
CL_SECURE_MODE
|
static String |
CL_START_AL
|
static String |
CL_START_EH
|
static String |
CL_USAGE
Command line switches |
static String |
CL_VERSION_INFO
|
static String |
CL_WAIT
|
static RS |
gRS
Global static reference to the master RS object (non-threaded) |
static MetamergeConfig |
gSysConfig
This is the templates configuration file loaded from the rs.jar file |
long |
mmReloaded
|
long |
mmServerStarted
Time we started |
long |
mmStarted
|
Hashtable |
params
This table holds the command line params. |
static String |
PROP_CONFIG_ENCODING
System property that specifies the encoding to be used when reading/writing configuration files. |
static String |
PROP_SECURE_MODE
System property that specifies whether the Server is run in secure mode. |
static String |
PROP_SERVER_KEY_ALIAS
|
static String |
PROP_SERVER_KEYSTORE
|
static String |
PROPERTY_JVM_SHUTDOWN_HOOK
|
static String |
PROTECT_PREFIX
|
static String |
PROTECT_VAL_PREFIX
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
|
RS()
Default constructor |
protected |
RS(String[] args)
|
protected |
RS(ThreadGroup group,
String name)
|
Method Summary | |
---|---|
void |
checkTask(String name)
Check for existance of "AssemblyLine" name, or throw an exception |
String |
commandLineParam(String param)
Returns the value for a command line parameter |
void |
dump(Object o)
This methods dumps an object to the log file. |
void |
dumpEntry(Entry e)
This methods dumps the contents of an Entry to the log file. |
static void |
encryptPropertiesfile(String path,
Log log)
|
AttributeMapConfig |
getAttributeMap(String name)
Returns the the "Attribute Map" entry for a named connector |
String |
getCommandLineConfigId()
|
String |
getConfigPath()
This method returns the current configuration file path |
Object |
getConfiguration(String key)
Returns the entire table or a sub-section of the configuration file. |
ConnectorConfig |
getConnector(String name)
Returns the "Connector" entry for name |
ConnectorPool |
getConnectorPool(String connName)
|
String[] |
getConnectorPoolNames()
|
Throwable |
getExitError()
Returns the exit error of the instance |
int |
getExitStatus()
Returns the exit code of the instance |
FunctionConfig |
getFunction(String name)
Returns the "FunctionConfig" entry for name |
LibraryConfig |
getLibraries()
Returns all "Libraries" |
Object |
getLibrary(String name)
Returns the the "Java Library" entry for name |
static com.ibm.it.rome.xslm.ITLMApplicationLicense |
getLicense()
Function to retrieve licence |
Log |
getLog()
Returns the Log for the current instance |
String |
getLogDirectory(Object owner)
This method returns the default directory path where logfiles are stored. |
MetamergeConfig |
getMetamergeConfig()
Returns the config object for this instance |
String |
getNullBehavior()
Return the null behavior value from the System.props |
String |
getNullBehaviorValue()
|
String |
getNullDefinition()
Return the null definition value from the System.props |
String |
getNullDefinitionValue()
|
ParserConfig |
getParser(String name)
Returns the the "Parser" entry for name |
static ReconnectRuleEngine |
getReconnectRuleEngine()
|
ScriptConfig |
getScript(String name)
Returns the "Script Library" entry for name |
static RS |
getServer()
Returns the RS instance associated with the current ThreadGroup |
static RS |
getServer(String name)
Returns a named RS instance |
static RS |
getServerByConfig(MetamergeConfig aConfig)
|
String |
getSysProp(String name)
Returns the value for a system property. |
AssemblyLineConfig |
getTask(String name)
Returns the "AssemblyLine" entry |
EventHandlerConfig |
getTrigger(String name)
Returns the "EventHandler" entry |
Object |
invokeServerHook(String name,
Object caller,
Object userInfo)
Invokes a server hook. |
static boolean |
isSecured()
|
void |
limitNumberOfThreads()
|
void |
logerror(String msg,
Throwable error)
|
void |
logmsg(String msg)
This method writes a message to the logfile. |
void |
logmsg(String level,
String msg)
This method logs a message with the specified level. |
static void |
main(String[] args)
The main methods creates the Log object and kicks off the main thread. |
void |
persistConfiguration()
This method saves the current configuration to disk. |
static void |
prepareSolutionDirectory(Log log)
Prepare the solution directory (working directory) by ensuring solution.properties is present. |
static void |
registerServer(RS server)
Registers the config object to be associated with the current ThreadGroup |
static void |
releaseLicense(com.ibm.it.rome.xslm.ITLMApplicationLicense license)
Function to release licence |
void |
reload()
This method reloads the configuration file. |
AssemblyLine |
restartAL(String assemblyLine,
String checkpointID)
Restart the AssemblyLine given by the parameter. |
void |
run()
Thread main |
int |
runServer()
|
void |
setConfigPath(String path)
This method sets the current configuration file path. |
void |
setConfiguration(MetamergeConfig config)
|
static void |
setGlobalProperties()
|
void |
setMetamergeConfig(MetamergeConfig config)
Sets the given configuration to this instance. |
static boolean |
shouldCreateSolutionProps()
|
static void |
showLogHeader(Log log)
This method writes a log header to the Log object. |
void |
shutdownServer()
Set the shutdown request flag with exit code 0 |
void |
shutdownServer(int aExitCode)
Set the shutdown request flag with exit code |
AssemblyLine |
startAL(String assemblyLine)
Start named AssemblyLine |
AssemblyLine |
startAL(String assemblyLine,
Connector connector,
Entry work)
Start named AssemblyLine providing an initial work entry and a connector |
AssemblyLine |
startAL(String assemblyLine,
int runMode)
Start named AssemblyLine |
AssemblyLine |
startAL(String assemblyLine,
Object io)
Start named AssemblyLine providing a parameter |
AssemblyLine |
startAL(String assemblyLine,
Object io,
org.apache.log4j.Appender logAppender)
Start named AssemblyLine providing a parameter |
AssemblyLine |
startAL(TaskCallBlock tcb)
Start the AssemblyLine named in the TCB |
AssemblyLine |
startALDebug(String assemblyLine,
int port)
Start named AssemblyLine in debug mode. |
Thread |
startEH(String name)
This method starts an EventHandler. |
Object |
startEventTrigger(String name,
boolean checkEnabled)
This method starts an EventHandler. |
Object |
startEventTrigger(String name,
boolean checkEnabled,
int debugPort)
This method starts an EventHandler. |
Object |
startEventTrigger(String name,
boolean checkEnabled,
int debugPort,
int runMode)
This method starts an EventHandler. |
Object |
startEventTrigger(String name,
boolean checkEnabled,
int debugPort,
int runMode,
EventHandlerListener eventHandlerListener,
boolean deliverLogs)
|
void |
startEventTriggers()
This methods starts all EventHandlers that are configured with autoStart = true. |
static RS |
startServer(String[] args)
Calls startServer using the config URL as the unique thread group name. |
static RS |
startServer(String groupName,
Hashtable params)
Starts a new server instance. |
static RS |
startServer(String config,
String assemblyLines,
String eventHandlers)
Calls startServer using the config URL as the unique thread group name. |
static RS |
startServer(String config,
String assemblyLines,
String eventHandlers,
String passw)
Calls startServer using the config URL as the unique thread group name. |
static RS |
startServer(String config,
String assemblyLines,
String eventHandlers,
String passw,
boolean dontTerminate)
Calls startServer using the config URL as the unique thread group name. |
int |
stopAL(String name)
Stop named AssemblyLine |
int |
stopEH(String name)
Stop named EventHandler |
static void |
unregisterServer(RS server)
Registers the config object to be associated with the current ThreadGroup |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String CL_USAGE
public static final String CL_START_AL
public static final String CL_START_EH
public static final String CL_NO_AUTOSTART
public static final String CL_CONFIG
public static final String CL_WAIT
public static final String CL_PASSWORD
public static final String CL_DUMP_PROPS
public static final String CL_VERSION_INFO
public static final String CL_EXECUTE_SCRIPT
public static final String CL_RUN_DAEMON
public static final String CL_SECURE_MODE
public static final String CL_EXT_PROP_FILE
public static final String CL_DEBUG_OPTIONS
public static final String CL_AL_DEBUG
public static final String CL_EH_DEBUG
public static final String CL_DEBUG_PORT
public static final String CL_CONFIG_STDIN
public static final String CL_FORCE_RESET_CHECKPOINT
public static final String CL_RUN_MODE
public static final String CL_CONFIG_DRIVER
public static final String CL_LOGFILE
public static final String CL_NO_TERMINATE
public static final String CL_DISABLE_REMOTE_API
public static final String CL_CONFIG_ENCODING
public static final String CL_DUMP_PERFPROPS
public static final String CL_IGNORE_GLOBAL_PROPERTIES
public static final String CL_INTERNAL_CONFIG_NSTANCE_NAME
public static final String PROPERTY_JVM_SHUTDOWN_HOOK
public static final String PROTECT_PREFIX
public static final String PROTECT_VAL_PREFIX
public static final String PROP_CONFIG_ENCODING
public static final String PROP_SECURE_MODE
public static final String PROP_SERVER_KEYSTORE
public static final String PROP_SERVER_KEY_ALIAS
public static MetamergeConfig gSysConfig
public Hashtable params
public long mmServerStarted
public long mmStarted
public long mmReloaded
public static RS gRS
Constructor Detail |
---|
public RS()
protected RS(String[] args)
protected RS(ThreadGroup group, String name)
Method Detail |
---|
public static void releaseLicense(com.ibm.it.rome.xslm.ITLMApplicationLicense license)
public static com.ibm.it.rome.xslm.ITLMApplicationLicense getLicense() throws Exception
Exception
public static void main(String[] args) throws Exception
Exception
public static boolean isSecured()
public static ReconnectRuleEngine getReconnectRuleEngine()
public void setConfiguration(MetamergeConfig config)
public Object getConfiguration(String key)
getConfiguration
in interface RSInterface
key
- Name of subsection or null
public Object getLibrary(String name)
getLibrary
in interface RSInterface
name
- The java library name
public FunctionConfig getFunction(String name) throws Exception
getFunction
in interface RSInterface
name
- The name of the function
Exception
public LibraryConfig getLibraries()
getLibraries
in interface RSInterface
public ScriptConfig getScript(String name)
getScript
in interface RSInterface
name
- The script library name
public ConnectorConfig getConnector(String name)
getConnector
in interface RSInterface
name
- The connector name
public ParserConfig getParser(String name)
getParser
in interface RSInterface
name
- The parser name
public AttributeMapConfig getAttributeMap(String name)
getAttributeMap
in interface RSInterface
name
- The connector name
public AssemblyLineConfig getTask(String name)
getTask
in interface RSInterface
name
- The AssemblyLine name
public void checkTask(String name) throws Exception
name
- The AssemblyLine name
Exception
public EventHandlerConfig getTrigger(String name)
getTrigger
in interface RSInterface
name
- The EventHandler name
public String getSysProp(String name)
getSysProp
in interface RSInterface
name
- The system property name
public int runServer()
public AssemblyLine restartAL(String assemblyLine, String checkpointID) throws Exception
restartAL
in interface RSInterface
assemblyLine
- The name identifying the AssemblyLine to startcheckpointID
- The checkpoint identifier
Any
- uncaught exception
Exception
public AssemblyLine startAL(String assemblyLine) throws Exception
startAL
in interface RSInterface
assemblyLine
- Name of AssemblyLine to start
Exception
public AssemblyLine startAL(String assemblyLine, int runMode) throws Exception
assemblyLine
- Name of AssemblyLine to start
Exception
public AssemblyLine startALDebug(String assemblyLine, int port) throws Exception
assemblyLine
- Name of AssemblyLine to start
Exception
public AssemblyLine startAL(String assemblyLine, Connector connector, Entry work) throws Exception
startAL
in interface RSInterface
assemblyLine
- Name of AssemblyLine to startconnector
- The runtime connector (or null)work
- The initial work entry to the AssemblyLine (or null)
Exception
public AssemblyLine startAL(TaskCallBlock tcb) throws Exception
tcb
- The TaskCallBlock
Exception
public AssemblyLine startAL(String assemblyLine, Object io) throws Exception
startAL
in interface RSInterface
assemblyLine
- Name of AssemblyLine to startio
- Parameter to AssemblyLine (Work Entry, Connector or Vector with both )
Exception
public AssemblyLine startAL(String assemblyLine, Object io, org.apache.log4j.Appender logAppender) throws Exception
assemblyLine
- Name of AssemblyLine to startio
- Parameter to AssemblyLine (Work Entry, Connector or Vector with both )logAppender
- A Log4J Appender to use with the AssemblyLine
Exception
public int stopAL(String name)
name
- Name of AssemblyLine to stop
public Thread startEH(String name) throws Exception
name
- The EventHandler name
Exception
- if the EventHandler cannot be found, or has no associated java classpublic int stopEH(String name)
name
- Name of EventHandler to stop
public void startEventTriggers()
public Object startEventTrigger(String name, boolean checkEnabled) throws Exception
startEventTrigger
in interface RSInterface
name
- The EventHandler namecheckEnabled
- If false, the autoStart flag is overridden
Exception
public Object startEventTrigger(String name, boolean checkEnabled, int debugPort) throws Exception
name
- The EventHandler namecheckEnabled
- If false, the autoStart flag is overriddendebugPort
- If true the EH is debugged
Exception
public Object startEventTrigger(String name, boolean checkEnabled, int debugPort, int runMode) throws Exception
name
- The EventHandler namecheckEnabled
- If false, the autoStart flag is overriddendebugPort
- If true the EH is debuggedrunMode
- The mode to run in.
Exception
public Object startEventTrigger(String name, boolean checkEnabled, int debugPort, int runMode, EventHandlerListener eventHandlerListener, boolean deliverLogs) throws Exception
Exception
public void logmsg(String msg)
logmsg
in interface RSInterface
msg
- The messagepublic void logmsg(String level, String msg)
logmsg
in interface RSInterface
level
- Loglevel. Legal values are FATAL, ERROR, WARN, INFO, DEBUG.
Unrecognized keyword means DEBUG.msg
- The messagepublic void logerror(String msg, Throwable error)
public void dump(Object o)
dump
in interface RSInterface
o
- The object to dumpRSInterface.dumpEntry(com.ibm.di.entry.Entry)
public void dumpEntry(Entry e)
dumpEntry
in interface RSInterface
e
- The entry to dumpEntry
public void reload() throws Exception
reload
in interface RSInterface
Exception
public String getConfigPath()
getConfigPath
in interface RSInterface
public void setConfigPath(String path)
setConfigPath
in interface RSInterface
path
- The new configuration pathpublic void persistConfiguration() throws Exception
persistConfiguration
in interface RSInterface
Exception
public static void showLogHeader(Log log)
log
- The log output objectpublic String getLogDirectory(Object owner)
owner
- The Java class or string denoting the type (e.g. AssemblyLine, EventHandler)
public void shutdownServer()
shutdownServer
in interface RSInterface
public void shutdownServer(int aExitCode)
shutdownServer
in interface RSInterface
public String getNullBehavior()
getNullBehavior
in interface RSInterface
public String getNullBehaviorValue()
getNullBehaviorValue
in interface RSInterface
public String getNullDefinition()
getNullDefinition
in interface RSInterface
public String getNullDefinitionValue()
getNullDefinitionValue
in interface RSInterface
public void limitNumberOfThreads()
public static void setGlobalProperties()
public static boolean shouldCreateSolutionProps()
public static void prepareSolutionDirectory(Log log) throws Exception
Exception
public static void encryptPropertiesfile(String path, Log log)
public void run()
run
in interface Runnable
run
in class Thread
public String commandLineParam(String param)
public MetamergeConfig getMetamergeConfig()
getMetamergeConfig
in interface RSInterface
public void setMetamergeConfig(MetamergeConfig config)
setMetamergeConfig
in interface RSInterface
config
- The configuration object to assign to the instance.public Log getLog()
public int getExitStatus()
public Throwable getExitError()
public static RS getServerByConfig(MetamergeConfig aConfig)
public static RS getServer()
public static RS getServer(String name)
public static void registerServer(RS server)
public static void unregisterServer(RS server)
public static RS startServer(String[] args) throws Exception
Exception
public static RS startServer(String config, String assemblyLines, String eventHandlers) throws Exception
Exception
public static RS startServer(String config, String assemblyLines, String eventHandlers, String passw) throws Exception
Exception
public static RS startServer(String config, String assemblyLines, String eventHandlers, String passw, boolean dontTerminate) throws Exception
Exception
public static RS startServer(String groupName, Hashtable params) throws Exception
groupName
- The unique name for the server instanceparams
- Hashtable of assemblylines to start (same syntax as command line)
Throws
- an exception if there is another instance using the same groupName
Exception
public String getCommandLineConfigId()
public Object invokeServerHook(String name, Object caller, Object userInfo)
name
- The name of the hookcaller
- The object invoking the hookuserInfo
- Arbitrary information to the hook from the callerpublic String[] getConnectorPoolNames()
public ConnectorPool getConnectorPool(String connName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |