commander/support
0.9.0Table of Contents
System Information
Definition Index
-
ORG.SHIRAKUMO.COMMANDER.SUPPORT
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *DEBUG*
The stream to output debug messages to, if any. See MAYBE-INVOKE-DEBUGGER See DBG
-
EXTERNAL SPECIAL-VARIABLE *DEFAULT-THREAD*
Default thread value for REMOTE-EVAL. This is NIL by default, though may be rebound for convenience. See REMOTE-EVAL See WITH-REMOTE-REPL
-
EXTERNAL SPECIAL-VARIABLE *INFO*
The stream to which notice messages are sent to, if any. See NOTE
-
EXTERNAL CLASS CLIENT
Representation of a client instance. See SOCKET See CLIENT-STREAM See VERSION See WRITE-LOCK See REPLY-TABLE See THREADED (type) See CL:CLOSE See CONNECTED-P See RECEIVE See SEND See SEND! See QUERY See REMOTE-EVAL
-
EXTERNAL CLASS CLIENT-STREAM
No documentation provided. -
EXTERNAL CLASS NAMED
Superclass for all objects with a name. See NAME
-
EXTERNAL CLASS THREADED
-
EXTERNAL CONDITION QUERY-FAILURE
Condition signalled if a command returns with a failure. See MESSAGE See REPLY-TO See UNWRAP-MESSAGE
-
EXTERNAL CONDITION QUERY-TIMEOUT
Error signalled when a query exceeds its timeout. When this error is signalled, the following restarts are available: - CONTINUE Continue waiting for a response indefinitely. - ABORT Abort the query returning NIL. - USE-VALUE Abort the query returning the given value. See MESSAGE See CLIENT See QUERY
-
EXTERNAL STRUCTURE MINIQUEUE
Encapsulates a queue. See MAKE-MINIQUEUE See MINIQUEUE-LENGTH See MINIQUEUE-POP See MINIQUEUE-WAIT See MINIQUEUE-PUSH See MINIQUEUE-FIND-IF
-
EXTERNAL FUNCTION DBG
- FORMAT
- &REST
- ARGS
Write to the debug output. See *DEBUG*
-
EXTERNAL FUNCTION MAKE-IDENTIFIER
Return a random, 4-character identifier string.
-
EXTERNAL FUNCTION MAKE-LOCK
- &REST
- IDENTIFIERS
Helper function to create a lock with a useful name.
-
EXTERNAL FUNCTION MAKE-MINIQUEUE
Create a new miniqueue instance. See MINIQUEUE (type)
-
EXTERNAL FUNCTION MAYBE-INVOKE-DEBUGGER
- CONDITION
- &KEY
- ABORT
Will call out to a suitable debugger if *DEBUG* is set. See *DEBUG*
-
EXTERNAL FUNCTION MINIQUEUE-FIND-IF
- TEST
- MINIQUEUE
- &KEY
- TIMEOUT
- DEFAULT
Return the next element in the queue matching a test and remove it. TEST should be a function of one argument, the value to check, which returns true if the value is considered to match the find. If no matching value is in the queue, the call blocks for up to TIMEOUT seconds, or forever if TIMEOUT is NIL. Two values are returned: the value that was removed from the queue, or DEFAULT if none, and a boolean that indicates whether a value was removed from the queue or not. See MINIQUEUE-WAIT See MINIQUEUE (type)
-
EXTERNAL FUNCTION MINIQUEUE-LENGTH
- INSTANCE
Return the number of objects currently in the queue. This is thread-safe. See MINIQUEUE (type)
-
EXTERNAL FUNCTION (SETF MINIQUEUE-LENGTH)
- VALUE
- INSTANCE
No documentation provided. -
EXTERNAL FUNCTION MINIQUEUE-POP
- MINIQUEUE
- &OPTIONAL
- DEFAULT
Return the next element in the queue and remove it. If the queue is empty, DEFAULT is returned. This is thread-safe. See MINIQUEUE (type)
-
EXTERNAL FUNCTION MINIQUEUE-PUSH
- VALUE
- MINIQUEUE
Add a new value to the end of the queue. See MINIQUEUE (type)
-
EXTERNAL FUNCTION MINIQUEUE-WAIT
- MINIQUEUE
- &KEY
- TIMEOUT
Return the next element in the queue and remove it, or wait until there is one. If the queue is empty, the call blocks for up to TIMEOUT seconds, or forever if TIMEOUT is NIL. Two values are returned: the value that was removed from the queue, if any, and a boolean that indicates whether a value was removed from the queue or not. This is thread-safe. See MINIQUEUE-FIND-IF See MINIQUEUE (type)
-
EXTERNAL FUNCTION NOTE
- FORMAT
- &REST
- ARGS
Note the object to the debug output and return it again. See DBG
-
EXTERNAL FUNCTION QUERY-ASYNC
- ON-REPLY
- CLIENT
- MESSAGE
- &REST
- ARGS
Send a query asynchronously, running ON-REPLY when a reply function is processed. In order to ensure that ON-REPLY is ever called, the HANDLE-MESSAGE function must be invoked for any V1:REPLY-type messages. Returns the sent message. See SEND! See QUERY See CLIENT (type) See WITH-DEFERRED-RESPONSE
-
EXTERNAL FUNCTION QUERY-UNWRAP
- HANDLER
- COMMAND
- &REST
- ARGS
Convenience function to call UNWRAP-MESSAGE on QUERY. See QUERY See UNWRAP-MESSAGE
-
EXTERNAL FUNCTION UNWRAP-MESSAGE
- RESPONSE
Unpacks the reply message. In case of a failure, a QUERY-FAILURE is signalled. In case of a return, its values are returned. In case of an ok, T is returned. See QUERY-FAILURE (type) See V1:FAILURE See V1:RETURN See V1:OK
-
EXTERNAL GENERIC-FUNCTION ALIVE-P
- THREADED
Returns true if the threaded's thread is currently running. See START See STOP See THREADED (type)
-
EXTERNAL GENERIC-FUNCTION (SETF ALIVE-P)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION CLIENT
- CONDITION
No documentation provided. -
EXTERNAL GENERIC-FUNCTION CLIENT-STREAM
- OBJECT
A stream that relays stream operations to the client via messages. This is a bidirectional character stream. By default this stream is *not* buffered, meaning any stream operation will result in a query to the client to perform the operation. Especially with remote clients and character-based operations this can be exceedingly slow. See CLIENT See PURPOSE See MAKE-CLIENT-STREAM See BUFFERING
-
EXTERNAL GENERIC-FUNCTION CONNECTED-P
- CLIENT
Returns true if the client is still connected. Note that this does not guarantee that a write or read on the client's stream will succeed. See CLIENT (type)
-
EXTERNAL GENERIC-FUNCTION MESSAGE
- CONDITION
The failure message associated with the condition. See QUERY-FAILURE (type)
-
EXTERNAL GENERIC-FUNCTION NAME
- OBJECT
Returns the name of the object. See NAMED (type)
-
EXTERNAL GENERIC-FUNCTION QUERY
- CLIENT
- MESSAGE
- &REST
- ARGS
- &KEY
- TIMEOUT
Send a query and block until a reply is received. Once a reply has been received, that message is returned. If the reply never arrives (because the client is stopped, its stream breaks, or some other error), then NIL is returned instead. If TIMEOUT is given it may be a real number indicating the maximum number of seconds to wait for a response before signalling a QUERY-TIMEOUT error. See SEND! See QUERY-ASYNC See QUERY-TIMEOUT (type) See CLIENT (type)
-
EXTERNAL GENERIC-FUNCTION RECEIVE
- CLIENT
Receives a message from the client's stream. Returns NIL if the receiving or decoding fails. See ORG.SHIRAKUMO.COMMANDER.PROTOCOL:MESSAGE (type) See CLIENT (type)
-
EXTERNAL GENERIC-FUNCTION REMOTE-EVAL
- CLIENT
- FORM
- &KEY
- PACKAGE
- THREAD
- PRINTED
- TIMEOUT
- &ALLOW-OTHER-KEYS
Runs the FORM on the remote server the CLIENT is connected to. Note that FORM must be a Lisp form which can be turned to a string representation via PRIN1. Further, the code will be evaluated in the given package on the server side. If the package is NIL, the *PACKAGE* will be whatever it is on the server side already. Returns whatever values are returned on the server side after running them through PROTO:DEREFERENCE-RECURSIVELY with :ON-MISSING :IGNORE. Meaning that the values may contain protocol reference objects, if the objects referred to do not reside locally. The lisp form will be evaluated in a specific thread on the server side, which you can specify with the THREAD argument. By default this argument is the value of *DEFAULT-THREAD*. If THREAD is NIL, a new thread is spun up for this evaluation. See *DEFAULT-THREAD* (variable) See CLIENT (type) See WITH-REMOTE-EVAL
-
EXTERNAL GENERIC-FUNCTION REPLY-TABLE
- OBJECT
Returns a hash table to associate message IDs to hook functions. See CLIENT (type)
-
EXTERNAL GENERIC-FUNCTION REPLY-TO
- CONDITION
The ID of the message to which this failure relates. See QUERY-FAILURE (type)
-
EXTERNAL GENERIC-FUNCTION RUN
- THREADED
The function to run within the THREADED's thread. Within primary methods of RUN, the threaded's THREAD is set, and the STOP restart is active. See THREADED (type)
-
EXTERNAL GENERIC-FUNCTION SEND
- CLIENT
- MESSAGE
- &REST
- ARGS
- &KEY
Sends a message over the client's stream. MESSAGE may either be a PROTO:MESSAGE instance, in which case ARGS are ignored, or a symbol naming a constructor function to which ARGS are passed before SENDing it out. While writing the message to the stream, the WRITE-LOCK is acquired to ensure no interleaved writes occur. Unlike SEND!, this function does not flush the underlying stream. See WRITE-LOCK See CLIENT (type) See SEND
-
EXTERNAL GENERIC-FUNCTION SEND!
- CLIENT
- MESSAGE
- &REST
- ARGS
- &KEY
Sends a message over the client's stream immediately. Like SEND, but flushes the stream. Returns the sent message. See SEND See CLIENT (type)
-
EXTERNAL GENERIC-FUNCTION SOCKET
- OBJECT
Returns the socket of the server, if any. See SERVER (type)
-
EXTERNAL GENERIC-FUNCTION START
- THREADED
Starts the threaded if it is not yet alive. Upon return, ALIVE-P should be true. See THREADED (type) See ALIVE-P
-
EXTERNAL GENERIC-FUNCTION STOP
- THREADED
Stops the threaded if it is currently alive. If this is executed within the thread managed by the threaded, then the STOP restart is invoked. Otherwise if the thread is alive, the STOP restart is invoked within it. After calling this function, ALIVE-P should be false. See THREADED (type) See ALIVE-P
-
EXTERNAL GENERIC-FUNCTION THREAD
- OBJECT
The thread that the object manages, if any. See THREADED (type) See ALIVE-P
-
EXTERNAL GENERIC-FUNCTION (SETF THREAD)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VERSION
- OBJECT
Returns the protocol version the client uses to communicate. See ORG.SHIRAKUMO.COMMANDER.PROTOCOL:VERSION See CLIENT (type)
-
EXTERNAL GENERIC-FUNCTION WRITE-LOCK
- OBJECT
Returns the lock used to protect against write collisions on the stream. See CLIENT (type)
-
EXTERNAL MACRO WITH-DEFERRED-RESPONSE
- CLIENT
- CONSTRUCTOR
- &REST
- ARGS
- VALS
- &BODY
- BODY
Convenience macro around QUERY-ASYNC. VALS are bound to the values returned by UNWRAP-MESSAGE and BODY is evaluated when the query returns, in whichever thread handles that message. See QUERY-ASYNC
-
EXTERNAL MACRO WITH-REMOTE-EVAL
- CLIENT
- &REST
- ARGS
- &BODY
- BODY
Shorthand macro to evaluate the body forms on the remote server. This is a convenience around REMOTE-EVAL. See REMOTE-EVAL
-
EXTERNAL MACRO WITH-REMOTE-REPL
- CLIENT
- &OPTIONAL
- REPL
- NAME
- &BODY
- BODY
Shorthand macro to create a remote REPL. During the body, *DEFAULT-THREAD* is bound to the REPL's thread so you can call REMOTE-EVAL without needing to pass it explicitly. See *DEFAULT-THREAD* See REMOTE-EVAL
-
EXTERNAL SOURCE-TRANSFORM MINIQUEUE-LENGTH
No documentation provided. -
EXTERNAL SOURCE-TRANSFORM (SETF MINIQUEUE-LENGTH)
No documentation provided.
-