public class SystemMsg extends Object
Modifier and Type | Field and Description |
---|---|
protected long |
history
history indicates message queues having processed the message
|
protected int |
id
id contains a unique message ID (sequential)
|
byte[] |
msg
msg the message content (string, structure, etc.)
|
protected long |
owner
owner defines the process originating the message
|
static int |
SM_GCRUN
SM_GCRUN (0x10) This message is sent by JANOS to indicate that the JVM Garbage Collector (GC) is
running.
|
static int |
SM_PIPECLOSE
SM_PIPECLOSE (0x81) Sent by the WebServer when a Websocket pipe connection closes.
|
static int |
SM_PIPEOPEN
SM_PIPEOPEN (0x80) This message is sent by the WebServer when there is a request to open a Websocket pipe.
|
static int |
SM_PROBE
SM_PROBE (0x02) This message is sent by JANOS periodically to monitor the health of the message loop.
|
static int |
SM_PROTCMDMSG
SM_PROTCMDMSG (0x70) This message is sent by the JNIOR Protocol message upon receipt of a Custom
Command message type 255.
|
static int |
SM_PROTCMDRESP
SM_PROTCMDRESP (0x71) This message will be generated by an application designed to respond to a
JNIOR Protocol Custom Command message type 255.
|
static int |
SM_REGUPDATE
SM_REGUPDATE (0x40) This message is sent by JANOS whenever a Registry Key is created, updated or removed.
|
static int |
SM_SHUTDOWN
SM_SHUTDOWN (0x01) This message is sent by JANOS indicating that the system is shutting down.
|
static int |
SM_WATCHDOG
SM_WATCHDOG (ox11) This message is sent if an Application Watchdog has been configured to send
a system message when it is triggered.
|
static int |
SM_WEBSHUTDOWN
SM_WEBSHUTDOWN (0x61) This message is sent by the WebServer when the service is stopped.
|
static int |
SM_WEBSTARTUP
SM_WEBSTARTUP (0x60) This message is sent by the WebServer when the service is started.
|
protected long |
time
time indicates the uptime in milliseconds when the message originated
|
int |
type
type the message type (SM_PROBE etc.)
|
Constructor and Description |
---|
SystemMsg() |
Modifier and Type | Method and Description |
---|---|
int |
getID()
Obtains the unique message ID assigned to the message.
|
String |
toString()
Returns the message as a string.
|
public static final int SM_SHUTDOWN
The msg
will indicate the reason for the shutdown. This generally will indicate "reboot".
public static final int SM_PROBE
public static final int SM_GCRUN
public static final int SM_WATCHDOG
msg
will contain text specified by the application or
other identification (may be "unknown"). A process tapping the message pump MUST repost this message. The
originator may consume the message if that is the intended use.public static final int SM_REGUPDATE
msg
will indicate the key name. All processes tapping the message pump MUST repost this message.
A process may then query the Registry for the key's value if needed.public static final int SM_WEBSTARTUP
public static final int SM_WEBSHUTDOWN
public static final int SM_PROTCMDMSG
msg
contains a binary structure as follows:
index size description 0 4 IP address of remote protocol client 4 2 IP port of remote protocol client 6 N Variable length Custom Command as supplied by client
public static final int SM_PROTCMDRESP
msg
must contain a binary structure as follows:
index size description 0 4 IP address of destination protocol client 4 2 IP port of destination protocol client 6 N Variable length response
The JNIOR Protocol server will consume this message. It will scan its client list for clients with matching IP address and port. If the client is active the response will be transmitted.
This message should be sent ONLY in response to a SM_PROTCMDMSG reflecting the IP address and port from that message. Only one response for every custom command should be sent. Unsolicited responses may corrupt the protocol stream.
public static final int SM_PIPEOPEN
The pipe is identified by a numeric "app" parameter supplied in the Websocket URL. Pipe identifiers MUST be an EVEN integer greater than or equal to 1024.
msg
will contain a binary structure as follows:
index size description 0 4 IP address of client 4 2 IP port of client 6 2 Pipe identifier (app number)
Al Websocket message traffic will then be passed through the message pump using the User Message Number (numbers greater than or equal to 1024) defined by the "app" parameter. An application designed to service this pipe will respond using the message number one greater (app + 1). The WebServer will forward responses through the Websocket connection.
The format of pipe messages is completely arbitrary and application specific. For instance this might typically contain JSON message structures.
public static final int SM_PIPECLOSE
The pipe is identified by the numeric "app" parameter supplied in the original Websocket URL.
msg
will contain a binary structure as follows:
index size description 0 4 IP address of client 4 2 IP port of client 6 2 Pipe identifier (app number)
All incoming message traffic from the pipe will cease and responses ignored.
protected long owner
protected int id
protected long time
protected long history
public int type
public byte[] msg