|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RSInterface
The top level Thread is an instance of this class, called the main object. It has methods for manipulating AssemblyLines.
Method Summary | |
---|---|
void |
dump(Object o)
Dumps the class and contents of an object to the log file. |
void |
dumpEntry(Entry e)
Dumps the contents of an Entry to the log file. |
AttributeMapConfig |
getAttributeMap(String name)
Returns the the "Attribute Map" for a named connector |
String |
getConfigPath()
This method returns the current configuration file path |
Object |
getConfiguration(String name)
Returns the entire table or a sub-section of the configuration file. |
ConnectorConfig |
getConnector(String name)
Returns the "Connector" entry for name |
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 |
Log |
getLog()
|
MetamergeConfig |
getMetamergeConfig()
Returns the config object for this instance. |
String |
getName()
|
String |
getNullBehavior()
Return the null behavior string from the System.props |
String |
getNullBehaviorValue()
Gets the null behavior value. |
String |
getNullDefinition()
Return the null definition string from the System.props |
String |
getNullDefinitionValue()
Gets the null definition value. |
ParserConfig |
getParser(String name)
Returns the the "Parser" entry for name |
ScriptConfig |
getScript(String name)
Returns the the "Script Library" entry for name |
ServerSocketFactory |
getServerSocketFactory(boolean useSSL)
Gets a Server Socket Factory for creating Server Sockets. |
String |
getSysProp(String name)
Returns the value of a system property. |
AssemblyLineConfig |
getTask(String name)
Returns the "AssemblyLine" entry |
void |
logerror(String msg)
Writes an error message to the system log file. |
void |
logmsg(String msg)
Writes a message to the system log file. |
void |
logmsg(String level,
String msg)
This method logs a message with the specified level to the log. |
void |
persistConfiguration()
This method saves the current configuration to disk. |
void |
reload()
This method reloads the configuration file. |
AssemblyLine |
restartAL(String assemblyLine,
String checkpointID)
Deprecated. |
void |
setConfigPath(String path)
This method sets the current configuration file path. |
void |
setMetamergeConfig(MetamergeConfig config)
Sets the given configuration to this instance. |
void |
shutdownServer()
Raise the shutdown request flag and set the exit code to 0. |
void |
shutdownServer(int aExitCode)
Raise the shutdown request flag and specify an exit code. |
AssemblyLine |
startAL(String assemblyLine)
Start a 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,
Object io)
Start a named AssemblyLine providing various objects. |
Method Detail |
---|
Object getConfiguration(String name)
name
- Name of subsection or null
MetamergeConfig getMetamergeConfig()
void setMetamergeConfig(MetamergeConfig config)
config
- The configuration object to assign to the instance.AssemblyLineConfig getTask(String name)
name
- The AssemblyLine name
ConnectorConfig getConnector(String name)
name
- The connector name
Object getLibrary(String name)
name
- The java library name
LibraryConfig getLibraries()
ParserConfig getParser(String name)
name
- The parser name
ScriptConfig getScript(String name)
name
- The script library name
AttributeMapConfig getAttributeMap(String name)
name
- The connector name
FunctionConfig getFunction(String name) throws Exception
name
- The name of the function
Exception
- if a lookup error occurs.String getSysProp(String name)
name
- The system property name, or null
if there is no
property with that name
void persistConfiguration() throws Exception
Exception
- if an error while persisting the configuration occurs.void logmsg(String msg)
Example:
main.logmsg("Conn object: "); main.dumpEntry(conn);
msg
- The message to be output.void logerror(String msg)
msg
- The message to outputvoid logmsg(String level, String msg)
Example:
main.logmsg("INFO", "Reading entry..."); var entry = input.getConnector().getNextEntry();
level
- Level of log. Legal values are FATAL, ERROR, WARN, INFO,
DEBUG. Unrecognized keyword means DEBUG.msg
- The messagevoid dump(Object o)
dumpEntry(Entry)
method instead.
o
- The object to dumpdumpEntry(Entry)
void dumpEntry(Entry e)
Example:
var ctor = input.getConnector(); for (;;) { var entry = ctor.getNextEntry(); if (entry != null) { main.logmsg("Read entry: "); main.dumpEntry(entry); } else break; }
e
- The Entry object to dumpEntry
AssemblyLine startAL(String assemblyLine) throws Exception
Example:
var al = main.startAL("ALName"); var tcb = al.getTCB(); main.logmsg("AL run mode: " + tcb.getRunMode()); main.logmsg("AL operation: " + tcb.getALOperation()); main.logmsg("AL settings: "); main.dumpEntry(tcb.getALSettings());
assemblyLine
- The name identifying the AssemblyLine to start
Exception
- if assemblyLine
is an unknown AssemblyLine or if
any of the connectors cannot be initializedAssemblyLine startAL(String assemblyLine, Object io) throws Exception
Example:
var iwe = new com.ibm.di.entry.Entry(); iwe.setAttribute("linenumber", "1"); iwe.setAttribute("", "Some line with text"); var c = new com.ibm.di.connectors.FileConnector(); var al = main.startAL("ALName", iwe); var tcb = al.getTCB(); main.logmsg("AL run mode: " + tcb.getRunMode()); main.logmsg("AL connector 'debug' parameter: " + tcb.getConnectorParameter("ConnectorName", "debug")); main.logmsg("AL initial work entry: "); main.dumpEntry(tcb.getInitialWorkEntry());
assemblyLine
- The name identifying the AssemblyLine to startio
- This Object could either be
Exception
- if assemblyLine
is an unknown AssemblyLine or if
any of the connectors cannot be initializedAssemblyLine startAL(String assemblyLine, Connector connector, Entry work) throws Exception
Example:
var iwe = new com.ibm.di.entry.Entry(); iwe.setAttribute("linenumber", "1"); iwe.setAttribute("line", "Some line with text"); var c = main.getConnector("ConnectorName"); var al = main.startAL("ALName", c, iwe); var tcb = al.getTCB(); main.logmsg("AL run mode: " + tcb.getRunMode()); main.logmsg("AL initial work entry: "); main.dumpEntry(tcb.getInitialWorkEntry());
assemblyLine
- The name identifying the AssemblyLine to startconnector
- The runtime-provided Connectorwork
- The initial work entry
Exception
- if assemblyLine
is an unknown AssemblyLine or if
any of the connectors cannot be initialized@Deprecated AssemblyLine restartAL(String assemblyLine, String checkpointID) throws Exception
assemblyLine
- The name identifying the AssemblyLine to startcheckpointID
- The checkpoint identifier
Exception
- if assemblyLine
is an unknown AssemblyLine or if
any of the connectors cannot be re-initializedvoid reload() throws Exception
Exception
- if the operation fails.String getConfigPath()
void setConfigPath(String path)
path
- The new configuration pathvoid shutdownServer()
void shutdownServer(int aExitCode)
aExitCode
- the code to return when the application exits.String getNullBehavior()
String getNullBehaviorValue()
String getNullDefinition()
String getNullDefinitionValue()
String getName()
Log getLog()
ServerSocketFactory getServerSocketFactory(boolean useSSL)
useSSL
determines whether a SSL Server Socket
Factory is returned or non-SSL one.
useSSL
- Determines if SSL or non-SSL Server Socket Factory is returns
for use.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |