-
Notifications
You must be signed in to change notification settings - Fork 15
Autonet
Graham Tremper edited this page Jul 28, 2014
·
2 revisions
AutoNet server is a simple websocket server that broadcasts AutowiringEvents
to subscribers. The client can subscribe and unsubscribe from the server, as well as some simple interactions with the Autowiring system. When a client subscribes, they are sent a stream of messages to recreate the current state of the system. After that, messages are sent to each subscriber whenever an AutowiringEvent occurs.
JSON messages are sent to the client in this format. This format is used for messages sent to both the client and the server
{
type: "messageType", // string designating message name
args: [] // A list of arguments for the handler of "messageType"
}
Type | Argument 1 | Argument 2 | Argument 3 | Argument 4 |
---|---|---|---|---|
"subscribe" | A list of all injectable types | None | None | None |
"unsubscribe" | None | None | None | None |
"newContext" | Unique int id for context | Object containing the name and parent of the context | None | None |
"expiredContext" | Unique int id for context | None | None | None |
"newObject | ID for context containing object | Object describing types the object implements. Key exists if object implements the type. Some types have additional type-specific data as the value, or true if no data |
Additional object data | None |
"eventFired" | ID for context event was fired in | Object containing event data | None | None |
"threadUtilization" | ID for context containing thread | Name of thread | Kernel utilization percent | User utilization percent |
Type | Argument 1 | Argument 2 |
---|---|---|
"subscribe" | None | None |
"unsubscribe" | None | None |
"terminateContext" | Unique int id for the context to shut down | None |
"injectContextMember" | Unique int id for the context in inject into | String name of type to inject |
"breakpoint" | String name of breakpoint | None |
"resumeFromBreakpoint" | String name of breakpoint | None |