|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.SimpleProgressReporter net.sf.basedb.clients.web.util.SimpleSignalProgressReporter
public class SimpleSignalProgressReporter
This class can be used to report progress and hold signal receiver for those export plugins that download immediately. There can only be one SignalHandler registerd at a time to this class.
Field Summary | |
---|---|
private SignalHandler |
handler
|
private static Logger |
logger
Log signals processing. |
private Thread |
notifyThread
|
Constructor Summary | |
---|---|
SimpleSignalProgressReporter(ProgressReporter progress)
|
Method Summary | |
---|---|
void |
close(int wait)
Close the receiver. |
Class<? extends SignalTransporter> |
getSignalTransporterClass()
This class does not need any signal transporter. |
void |
init(String receiverId)
Nothing need to be initilized. |
String |
registerSignalHandler(SignalHandler handler)
This return null when there is no need for a global id. |
void |
sendToAll(Signal signal)
Deprecated. |
void |
sendToAll(SignalSender sender)
Let the signal sender send one or more signals to all registered signal handlers on this reciever. |
void |
unregisterSignalHandler(SignalHandler handler)
Unregister a signal handler from this receiever. |
Methods inherited from class net.sf.basedb.core.SimpleProgressReporter |
---|
append, display, getMessage, getPercent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Logger logger
private SignalHandler handler
private Thread notifyThread
Constructor Detail |
---|
public SimpleSignalProgressReporter(ProgressReporter progress)
Method Detail |
---|
public void close(int wait)
SignalReceiver
close
in interface SignalReceiver
wait
- If the value is zero or positive, the Signal.ABORT
should be sent to all registered signal handlers. The signal receiver
should then wait at most the specified number of milliseconds for
all signal handlers to get unregistered. If the timeout expires before
all signal handlers has processed the signal, the signal receiver should
continue it's shutdown.public Class<? extends SignalTransporter> getSignalTransporterClass()
getSignalTransporterClass
in interface SignalReceiver
SignalTransporter
SignalReceiver.getSignalTransporterClass()
public void init(String receiverId)
init
in interface SignalReceiver
receiverId
- Parameters needed to initialise the receiverSignalReceiver.init(java.lang.String)
public String registerSignalHandler(SignalHandler handler)
registerSignalHandler
in interface SignalReceiver
handler
- The signal handler that should receive signals through this
receiver
SignalReceiver.registerSignalHandler(net.sf.basedb.core.signal.SignalHandler)
@Deprecated public void sendToAll(Signal signal)
SignalReceiver
Signal.ABORT
when the system is shutting down.
sendToAll
in interface SignalReceiver
signal
- The signal to sendpublic void sendToAll(SignalSender sender)
SignalReceiver
sendToAll
in interface SignalReceiver
sender
- A signal sender implementationpublic void unregisterSignalHandler(SignalHandler handler)
SignalReceiver
unregisterSignalHandler
in interface SignalReceiver
handler
- The handler to unregister
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |