public class MessagePump extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SM_GCRUN
SM_GCRUN
|
static int |
SM_PIPECLOSE
SM_PIPECLOSE
|
static int |
SM_PIPEOPEN
SM_PIPEOPEN
|
static int |
SM_PROBE
SM_PROBE
|
static int |
SM_PROTCMDMSG
SM_PROTCMDMSG
|
static int |
SM_PROTCMDRESP
SM_PROTCMDRESP
|
static int |
SM_PWRSUPP
SM_PWRSUPP
|
static int |
SM_REGUPDATE
SM_REGUPDATE
|
static int |
SM_SHUTDOWN
SM_SHUTDOWN
|
static int |
SM_WATCHDOG
SM_WATCHDOG
|
static int |
SM_WEBSHUTDOWN
SM_WEBSHUTDOWN
|
static int |
SM_WEBSTARTUP
SM_WEBSTARTUP
|
Constructor and Description |
---|
MessagePump() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the message pump and releases the message queue.
|
protected void |
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
SystemMsg |
getMessage()
Retrieve a system message.
|
SystemMsg |
getMessage(int type)
Retrieves the desired message from the message queue.
|
SystemMsg |
getMessage(int low,
int high)
Retrieves messages in the specified range from the message queue.
|
boolean |
open()
Opens a message pump and creates a message queue.
|
boolean |
postMessage(SystemMsg message)
Sends the supplied SystemMsg
|
public static final int SM_SHUTDOWN
public static final int SM_PROBE
public static final int SM_PWRSUPP
public static final int SM_GCRUN
public static final int SM_WATCHDOG
public static final int SM_REGUPDATE
public static final int SM_WEBSTARTUP
public static final int SM_WEBSHUTDOWN
public static final int SM_PROTCMDMSG
public static final int SM_PROTCMDRESP
public static final int SM_PIPEOPEN
public static final int SM_PIPECLOSE
public boolean open()
public void close()
public SystemMsg getMessage(int type)
type
- - the message typepublic SystemMsg getMessage(int low, int high)
low
- - low end of message range (inclusive)high
- - high end of message range (inclusive)public SystemMsg getMessage()
public boolean postMessage(SystemMsg message)
message
- SystemMsg calls containing the message to send.protected void finalize() throws Throwable
Object
finalize
method to dispose of
system resources or to perform other cleanup.
Any exception thrown by the finalize
method causes
the finalization of this object to be halted, but is otherwise
ignored.
The finalize
method in Object
does
nothing.