public abstract class LexiComOutgoingThread
extends java.lang.Object
implements java.lang.Runnable
Implementation can be configured to run directly within the VersaLex service/daemon by setting "Custom LexiComOutgoingThread Class" in Configure>Options>Other and copying an archive containing the implementation into VersaLex's lib/api/ folder. If configured this way, VersaLex will instantiate the implementation and invoke the start() method at service/daemon startup and will invoke the stop() method and wait for the thread to finish when the service/daemon shuts down.
| Constructor and Description |
|---|
LexiComOutgoingThread()
Constructor used by VersaLex itself when LexiComOutgoingThread implementation
is configured directly in VersaLex Configure>Options>Other>Custom LexiComOutgoingThread
Class.
|
LexiComOutgoingThread(ILexiCom lexicom)
Constructor used by developer when LexiComOutgoingThread implementation is being
used outside of VersaLex via LexiComFactory.getVersaLex() ILexiCom object.
|
| Modifier and Type | Method and Description |
|---|---|
IActionController |
getActionController(java.lang.String[] path)
Get an action controller
|
IListenerController |
getListenerController()
Get the listener controller
|
IMailboxController |
getMailboxController(java.lang.String[] path)
Get a mailbox controller
|
ILexiCom |
getVersaLex()
Gets a VersaLex product API object
|
boolean |
isAlive()
Tests if thread is alive
|
protected boolean |
isStopped()
Tests whether stop has been requested on the running thread
|
abstract void |
run()
Method is wide-open, but the expectation is to continuously wait/watch for new
outgoing payload in an VersaLex-independent repository (e.g. database, message queue,
directory, etc.) and when new payload is found that needs to be routed outbound, acquire an
IMailboxController for the appropriate trading partner and stream out the payload
|
void |
setVersaLex(ILexiCom lexicom)
Sets a VersaLex product API object
|
void |
start()
Creates a new Thread, which calls the run() method
|
void |
stop()
Sets a stop flag and calls interrupt() on the running thread
|
public LexiComOutgoingThread()
public LexiComOutgoingThread(ILexiCom lexicom)
lexicom - LexiCom instance - can be obtained using LexiComFactory.getCurrentInstance()public void start()
public void stop()
protected boolean isStopped()
public boolean isAlive()
public abstract void run()
run in interface java.lang.Runnablepublic ILexiCom getVersaLex() throws java.lang.Exception
java.lang.Exception - if the VersaLex installation is invalid or if request
conflicted with other VersaLex objectspublic void setVersaLex(ILexiCom lexicom) throws java.lang.Exception
lexicom - LexiCom instance - can be obtained using LexiComFactory.getCurrentInstance()java.lang.Exception - if the VersaLex installation is invalid or if request
conflicted with other VersaLex objectspublic IMailboxController getMailboxController(java.lang.String[] path) throws java.lang.Exception
path - the alias path to the mailboxjava.lang.Exception - if VersaLex object no longer open or if running in CLIENT
mode and remote method invocation errorpublic IActionController getActionController(java.lang.String[] path) throws java.lang.Exception
path - the alias path to the actionjava.lang.Exception - if VersaLex object no longer open or if running in CLIENT
mode and remote method invocation errorpublic IListenerController getListenerController() throws java.lang.Exception
java.lang.Exception - if VersaLex object no longer open or if running in CLIENT
mode and remote method invocation error