|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.xbus.technical.ReceiverThreadManager
public class ReceiverThreadManager
Manages the state of all receivers running in the background. This class implements the Singleton design pattern.
Field Summary | |
---|---|
protected static int |
DEFAULT_STOP_AFTER_ERRORS
Default for the amount of errors, after them a receiver will be stopped. |
Method Summary | |
---|---|
void |
clearStoppedHTTPReceivers()
Clears the list of all stopped HTTPReceivers. |
void |
demandStopReceiverThread(java.lang.String system)
Demands the stop of the ReceiverThread for the given system . |
java.util.Set |
getAllReceiverThreads()
Returns a set with the names of all ReceiverThreads found in the Configuration . |
java.util.Set |
getAllSystems()
Returns a set with the names of all background receivers (ReceiverThreads and HTTPReceivers) found in the Configuration . |
static ReceiverThreadManager |
getInstance()
Returns the one and only object of class ReceiverThreadManager . |
protected java.util.Set |
getRunningHTTPReceivers()
Returns a set with the names of all running HTTPReceivers. |
java.util.Set |
getRunningReceiverThreads()
Returns a set with the names of all running ReceiverThreads. |
java.util.Set |
getRunningSystems()
Returns a set with the names of all running background receivers (ReceiverThreads and HTTPReceivers). |
static int |
getStopAfterErrors(java.lang.String system,
java.lang.String receiverClassName)
Returns the amount of errors, after them a receiver will be stopped The value is read out of the configuration, either a default for the receiver class or a value specific for the current source. |
java.util.Set |
getStoppedSystems()
Returns a set with the names of all stopped background receivers (ReceiverThreads and HTTPReceivers). |
boolean |
isHTTPReceiverStopped(java.lang.String system)
Indicates whether a HTTPReceiver is stopped |
protected void |
setIsServletEngine(boolean isServletEngine)
Indicates whether the ReceiverService is started inside a servlet engine. |
void |
startReceiverThread(java.lang.String system)
Starts a ReceiverThread for the given system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int DEFAULT_STOP_AFTER_ERRORS
Method Detail |
---|
public static ReceiverThreadManager getInstance()
ReceiverThreadManager
.
ReceiverThreadManager
public void startReceiverThread(java.lang.String system) throws XException
system
- the name of the system to start the receiver for
XException
- if something goes wrongpublic void demandStopReceiverThread(java.lang.String system) throws XException
system
.
system
- the name of the system to stop the receiver for
XException
- if something goes wrongpublic java.util.Set getAllReceiverThreads()
Configuration
.
Configuration
public java.util.Set getAllSystems() throws XException
Configuration
.
Configuration
XException
- if something goes wrongpublic java.util.Set getRunningSystems() throws XException
XException
- if something goes wrongpublic java.util.Set getRunningReceiverThreads()
protected java.util.Set getRunningHTTPReceivers() throws XException
XException
- if something goes wrongpublic java.util.Set getStoppedSystems()
protected void setIsServletEngine(boolean isServletEngine)
isServletEngine
- true if the ReceiverService is running in a servlet enginepublic void clearStoppedHTTPReceivers()
public boolean isHTTPReceiverStopped(java.lang.String system)
system
- the name of the system
public static int getStopAfterErrors(java.lang.String system, java.lang.String receiverClassName)
system
- the name of the systemreceiverClassName
- the name of the receiver class
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |