The maiden Reference Manual

This is the maiden Reference Manual, version 3.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 06:09:44 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 maiden

A modern and extensible chat bot framework.

Maintainer

Yukari Hafner <>

Author

Yukari Hafner <>

Home Page

https://Shinmera.github.io/maiden/

Source Control

(GIT https://github.com/Shinmera/maiden.git)

Bug Tracker

https://github.com/Shinmera/maiden/issues

License

zlib

Version

3.1.0

Dependencies
  • deeds (system).
  • verbose (system).
  • trivial-garbage (system).
  • bordeaux-threads (system).
  • closer-mop (system).
  • uuid (system).
  • form-fiddle (system).
  • lambda-fiddle (system).
  • documentation-utils (system).
  • trivial-indent (system).
Source

maiden.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 maiden/maiden.asd

Source

maiden.asd.

Parent Component

maiden (system).

ASDF Systems

maiden.


3.1.2 maiden/package.lisp

Source

maiden.asd.

Parent Component

maiden (system).

Packages

3.1.3 maiden/toolkit.lisp

Dependency

package.lisp (file).

Source

maiden.asd.

Parent Component

maiden (system).

Public Interface
Internals

3.1.4 maiden/conditions.lisp

Dependency

toolkit.lisp (file).

Source

maiden.asd.

Parent Component

maiden (system).

Public Interface

3.1.5 maiden/event.lisp

Dependency

conditions.lisp (file).

Source

maiden.asd.

Parent Component

maiden (system).

Public Interface
Internals

3.1.6 maiden/standard-events.lisp

Dependency

event.lisp (file).

Source

maiden.asd.

Parent Component

maiden (system).

Public Interface

3.1.7 maiden/entity.lisp

Dependency

standard-events.lisp (file).

Source

maiden.asd.

Parent Component

maiden (system).

Public Interface
Internals

find-entity (generic function).


3.1.8 maiden/consumer.lisp

Dependency

entity.lisp (file).

Source

maiden.asd.

Parent Component

maiden (system).

Public Interface
Internals

3.1.9 maiden/core.lisp

Dependency

consumer.lisp (file).

Source

maiden.asd.

Parent Component

maiden (system).

Public Interface
Internals

find-entity (method).


3.1.10 maiden/agent.lisp

Dependency

core.lisp (file).

Source

maiden.asd.

Parent Component

maiden (system).

Public Interface

3.1.11 maiden/client.lisp

Dependency

agent.lisp (file).

Source

maiden.asd.

Parent Component

maiden (system).

Public Interface

client (class).


3.1.12 maiden/documentation.lisp

Dependency

client.lisp (file).

Source

maiden.asd.

Parent Component

maiden (system).


4 Packages

Packages are listed by definition order.


4.1 maiden

Source

package.lisp.

Nickname

org.shirakumo.maiden

Use List
  • common-lisp.
  • deeds.
Used By List

maiden-user.

Public Interface
Internals

4.2 maiden-user

Source

package.lisp.

Nickname

org.shirakumo.maiden.user

Use List

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *debugger*

This variable sets whether an internal error should call out to the debugger or not.

On deployed systems, this should probably be NIL. The
default value is whether the SWANK package is present
or not.

Package

maiden.

Source

toolkit.lisp.

Special Variable: *root*

This variable holds a directory pathname that points to the "root" of the Maiden installation.

The root should mainly be used for storage of runtime
fragments such as configuration, cache, and so forth.

Package

maiden.

Source

toolkit.lisp.


5.1.2 Macros

Macro: define-consumer (name direct-superclasses direct-slots &rest options)

Shorthand to define a consumer class.

This is like CL:DEFCLASS, with the appropriate superclass and metaclass injected for you. It also makes sure that the class definition is available during compile-time as well.

See CONSUMER
See CONSUMER-CLASS

Package

maiden.

Source

consumer.lisp.

Macro: define-event (name direct-superclasses direct-slots &rest options)

Shorthand macro to define an event class.

This takes care of potentially injecting the EVENT superclass and setting the necessary EVENT-CLASS metaclass. Otherwise it is identical to CL:DEFCLASS.

See CL:DEFCLASS
See EVENT
See EVENT-CLASS

Package

maiden.

Source

event.lisp.

Macro: define-function-handler ((consumer name &optional event-type) args &body body)

Shorthand macro to define an event an a corresponding handler in one go.

Special body options are extracted to provide further control over the definition of the event:
:SUPERCLASSES The superclass list to use.
:EXTRA-SLOTS A list of extra slot definitions.
:CLASS-OPTIONS A list of extra class options.
:DOCUMENTATION The docstring to use for the class.
:ADVICE The advice value to use for the event.
Note that these options will NOT be passed on to the DEFINE-HANDLER form.

The ARGS are used both for the arguments to DEFINE-HANDLER and as slot definitions by way of SLOT-ARGS->SLOTS.

See SLOT-ARGS->SLOTS
See DEFINE-EVENT
See DEFINE-HANDLER
See REMOVE-FUNCTION-HANDLER

Package

maiden.

Source

consumer.lisp.

Macro: define-handler ((consumer name event-type) args &body body)

Defines a new handler on the consumer class.

CONSUMER must be the class-name of the consumer to define on. NAME must be a symbol denoting the name of the handler definition. Note that this name will not be carried over to actual handler instances, as they would otherwise clash on multiple consumer instances on the same core. EVENT-TYPE must be a base class for all events that the handler will receive.
ARGS must be a list of arguments, of which the first two will be bound to the consumer instance and the event respectively. The rest of the arguments denote fuzzy slot bindings of the event.
BODY a number of extra handler definition options as a plist followed directly by a number of forms to evaluate upon receiving an event.

The body options are evaluated and passed as class initargs to the resulting handler instance once one is constructed. Note that as such the values will be shared across all instances of the handler defined here. Also note that there are three options which are exempt from this and play special roles:

:DELIVERY-FUNCTION This option is already provided by default. Supplying it manually will mean that the body forms of the DEFINE-HANDLER will be ignored. :MATCH-CONSUMER Should be a slot name of the event that needs to match the consumer for the event to be handled. You’ll want to use this option for handlers of clients, in order to ensure that the handler from the client instance that matches the client the event is intended for is called. :ADD-TO-CONSUMER By default T; decides whether the resulting handler instances should be added to the consumer directly, or to the cores the consumer is added to.

In effect this constructs an appropriate ABSTRACT-HANDLER instance and calls UPDATE-HANDLER with it on the consumer class.

See DEEDS:WITH-FUZZY-SLOT-BINDINGS
See DEEDS:WITH-ORIGIN
See ABSTRACT-HANDLER
See UPDATE-HANDLER
See REMOVE-HANDLER

Package

maiden.

Source

consumer.lisp.

Macro: define-instruction ((consumer instruction &optional event-type) args &body body)

Shorthand macro to define an instruction-like event.

This is essentially the same as DEFINE-FUNCTION-HANDLER with the following additions:
- INSTRUCTION-EVENT is always injected as a superclass.
- A function of the same name as the instruction is generated that creates the appropriate event and sends it off to a core.

This thus allows you to simulate a standard function interface for code that runs over the event-loop. Note that the generated function will not wait for a response to the event and immediately returns. The returned value is the generated event instance.

See DEFINE-FUNCTION-HANDLER
See BROADCAST
See REMOVE-INSTRUCTION

Package

maiden.

Source

consumer.lisp.

Macro: define-query ((consumer instruction &optional event-type event-response-type) args &body body)

Shorthand macro to define a query-like event.

This is similar to DEFINE-INSTRUCTION, with the exception that possibly two events (one for issue and one for response) are generated, and that the issue function will await a response and return with the intended return value, thus simulating a complete function API over the event system.

If no explicit EVENT-RESPONSE-TYPE is specified, a generic response event is used instead. See RESPOND.

See RESPOND
See REMOVE-QUERY

Package

maiden.

Source

consumer.lisp.

Macro: do-issue (core event-type &rest initargs)

Shorthand macro to construct and issue an event onto a core.

The event-type should not be quoted.

See DEEDS:DO-ISSUE

Package

maiden.

Source

toolkit.lisp.

Macro: named-lambda (name args &body body)

Attempt to construct a lambda with a name.

Note that standard name clashing rules apply and naming the lambda after a CL function will likely fail if the implementation supports package locks.

Package

maiden.

Source

toolkit.lisp.

Macro: update-list (thing list &key key test)

Macro to update the list with a new item.

The item is added to the list if it is not yet contained and updated in-place otherwise.

See MAKE-UPDATED-LIST

Package

maiden.

Source

toolkit.lisp.

Macro: with-awaiting ((core event-type) args setup-form &body body)

Waits for a response event to arrive on the core before evaluating the body.

This is useful to write event-driven, reactionary code.
The temporary handler to catch the code is added to the
core’s back loop.

Note that CORE can be one of
- CORE The temporary handler is attached to
the core’s block-loop.
- CONSUMER The first core on the client’s list of
cores is used as above.
- DEEDS:EVENT-LOOP The temporary handler is directly
attached to it.

You can also specify a maximum waiting timeout with the
:TIMEOUT body options. The timeout is in seconds. Similar
to DEFINE-HANDLER, you can also specify a :FILTER test
body option.

See DEEDS:WITH-AWAITING

Package

maiden.

Source

core.lisp.

Macro: with-default-encoding ((&optional encoding) &body body)

Evaluate BODY in an environment where the default external format is set to the given encoding.

Only works on:
- SBCL
- CCL

Package

maiden.

Source

toolkit.lisp.

Macro: with-retry-restart ((restart format-string &rest format-args) &body body)

Evaluates body around which a restart is established that allows retrying the evaluation of the body.

Similar to CL:WITH-SIMPLE-RESTART.

Package

maiden.

Source

toolkit.lisp.


5.1.3 Ordinary functions

Function: add-to-core (core &rest consumers)

Easily add consumers to a core.

The consumers will be started after having been added to the core. Each consumer in the list of consumers can be:

- A symbol denoting the class of consumer to construct - A string or keyword denoting a package that homes a symbol denoting a consumer class.
- A list starting with one of the above followed by the initargs for the class instantiation.

The instances are all constructed before any of them are added to the core or started, so as to catch errors early.

Package

maiden.

Source

core.lisp.

Function: broadcast (cores event-type &rest initargs)

Shorthand function to construct and issue an event onto a set of cores.

Unlike DO-ISSUE, this is a function, so the event-type
has to be quoted.

Package

maiden.

Source

toolkit.lisp.

Function: enlist (thing &rest extra-elements)

If THING is a list, it is returned. Otherwise a new list out of the given elements is constructed.

Package

maiden.

Source

toolkit.lisp.

Function: find-consumer-in-package (package)

Scans through the symbols in the given package and attempts to find one that denotes a class that is a subclass of CONSUMER.

The first such symbol found is returned.

Package

maiden.

Source

toolkit.lisp.

Function: format-absolute-time (time)

Formats the universal-time as a timestring in the format of YYYY.MM.DD hh:mm:ss

Package

maiden.

Source

toolkit.lisp.

Function: format-relative-time (seconds)

Formats the time in seconds as a human-readable string.

Time is split up into seconds, minutes, hours, days, weeks, months, years, decades, centuries, and æons.

Package

maiden.

Source

toolkit.lisp.

Function: format-time (time &optional relative-time-threshold)

Formats the universal-time in a (hopefully) appropriate manner.

If the time differs from now by more than the RELATIVE-TIME-THRESHOLD then the time is printed absolutely, otherwise relatively.

See FORMAT-RELATIVE-TIME
See FORMAT-ABSOLUTE-TIME

Package

maiden.

Source

toolkit.lisp.

Function: get-unix-time ()

Returns the time in seconds since the unix epoch of 1970.

Package

maiden.

Source

toolkit.lisp.

Function: kw (name)

Return the keyword corresponding to the given symbol designator.

Package

maiden.

Source

toolkit.lisp.

Function: make-core (&rest consumers)

Construct a new core instance and add consumers to it.

The resulting core will be started.

See CORE
See ADD-TO-CORE

Package

maiden.

Source

core.lisp.

Function: maybe-invoke-debugger (condition &optional restart &rest values)

Might invoke the debugger with the condition.

If *DEBUGGER* is non-NIL, the debugger is invoked with a CONTINUE restart surrounding it to allow giving up on handling the condition. Otherwise, if the RESTART argument is passed, that restart is invoked with the rest of the arguments as values for the restart.

See *DEBUGGER*

Package

maiden.

Source

toolkit.lisp.

Function: remove-function-handler (consumer name &optional event-type)

Shorthand function to remove a function-handler definition.

This removes both the event class and the handler it defined.

See CL:FIND-CLASS
See REMOVE-HANDLER

Package

maiden.

Source

consumer.lisp.

Function: remove-handler (abstract-handler class-ish)

Removes the handler from the consumer-class.

This function simply updates the list of direct-handlers on the class by removing the corresponding abstract-handler.

The class-ish can be a CONSUMER-CLASS, a CONSUMER, or a SYMBOL naming a consumer-class.

The abstract-handler can be an ABSTRACT-HANDLER, or a SYMBOL denoting the NAME of an abstract-handler.

See DIRECT-HANDLERS
See ABSTRACT-HANDLER
See CONSUMER-CLASS

Package

maiden.

Source

consumer.lisp.

Function: remove-instruction (consumer instruction &optional event-type)

Shorthand function to remove an instruction definition.

This removes both the event class, the handler, and the issue- function it defined.

See CL:FMAKUNBOUND
See REMOVE-FUNCTION-HANDLER

Package

maiden.

Source

consumer.lisp.

Function: remove-query (consumer instruction &optional event-type event-response-type)

Shorthand function to remove a query definition.

This removes both the event classes, the handler, and the issue- function it defined.

See REMOVE-FUNCTION-HANDLER
See CL:FIND-CLASS
See CL:FMAKUNBOUND

Package

maiden.

Source

consumer.lisp.

Function: starts-with (start sequence &key test)

Returns true if SEQUENCE begins with START.

Package

maiden.

Source

toolkit.lisp.

Function: universal-to-unix (universal)

Convert universal-time to unix-time.

Package

maiden.

Source

toolkit.lisp.

Function: unix-to-universal (unix)

Convert unix-time to universal-time.

Package

maiden.

Source

toolkit.lisp.

Function: unlist (thing &key key)

If THING is not a list, it is returned. Otherwise the element by KEY from the list is returned.

Package

maiden.

Source

toolkit.lisp.

Function: xnor (a b)

If both A and B are either true or false at the same time.

Package

maiden.

Source

toolkit.lisp.

Function: xor (a b)

If either A or B are true, but not both.

Package

maiden.

Source

toolkit.lisp.


5.1.4 Generic functions

Generic Function: add-consumer (consumer target)

Add the consumer to the core.

If the consumer already exists on the core, nothing is done. If a consumer of the same name already exists on the core, a warning of type CONSUMER-NAME-DUPLICATED-WARNING is signalled.

If a consumer has been added, an event of type CONSUMER-ADDED is issued onto the core.

See CONSUMER-NAME-DUPLICATED-WARNING
See CONSUMER-ADDED

Package

maiden.

Source

core.lisp.

Methods
Method: add-consumer :before ((agent agent) (core core))
Source

agent.lisp.

Method: add-consumer ((consumer consumer) (core core))
Method: add-consumer (consumer (targets list))
Method: add-consumer ((consumers list) target)
Method: add-consumer :around (consumer target)
Method: add-consumer :after ((consumer consumer) (core core))
Source

consumer.lisp.

Generic Reader: add-to-consumer (object)

Whether the generated handler of this abstract handler should be added to the consumer or the cores of the consumer.

See ABSTRACT-HANDLER

Package

maiden.

Methods
Reader Method: add-to-consumer ((abstract-handler abstract-handler))

automatically generated reader method

Source

consumer.lisp.

Target Slot

add-to-consumer.

Generic Writer: (setf add-to-consumer) (object)
Package

maiden.

Methods
Writer Method: (setf add-to-consumer) ((abstract-handler abstract-handler))

automatically generated writer method

Source

consumer.lisp.

Target Slot

add-to-consumer.

Generic Function: advice (object)

Accessor to the advice information on the event or event-class.

See EVENT-CLASS
See EVENT

Package

maiden.

Methods
Method: advice ((event event))
Source

event.lisp.

Reader Method: advice ((event-class event-class))

automatically generated reader method

Source

event.lisp.

Target Slot

effective-advice.

Generic Writer: (setf advice) (object)
Package

maiden.

Methods
Writer Method: (setf advice) ((event-class event-class))

automatically generated writer method

Source

event.lisp.

Target Slot

effective-advice.

Generic Reader: agent (condition)

Accessor to the agent that this object holds.

See AGENT-CONDITION

Package

maiden.

Methods
Reader Method: agent ((condition agent-condition))
Source

conditions.lisp.

Target Slot

agent.

Generic Reader: block-loop (object)

Accessor to the blocking back loop of the Maiden core.

This should govern one-time handlers and response events.

See CORE

Package

maiden.

Methods
Reader Method: block-loop ((core core))

automatically generated reader method

Source

core.lisp.

Target Slot

block-loop.

Generic Writer: (setf block-loop) (object)
Package

maiden.

Methods
Writer Method: (setf block-loop) ((core core))

automatically generated writer method

Source

core.lisp.

Target Slot

block-loop.

Generic Reader: client (condition)

Accessor to the client that this object holds.

See CLIENT-CONDITION

Package

maiden.

Methods
Reader Method: client ((client-event client-event))

automatically generated reader method

Source

standard-events.lisp.

Target Slot

client.

Reader Method: client ((condition client-condition))
Source

conditions.lisp.

Target Slot

client.

Generic Function: consumer (id target)

Retrieve a consumer from the core.

If no consumer that matches the ID is found, NIL is returned.

See MATCHES

Package

maiden.

Source

core.lisp.

Methods
Method: consumer (id (cores list))
Method: consumer (id (core core))
Generic Reader: consumers (object)

Accessor to the list of consumers associated with the core.

See CONSUMER
See CORE

Package

maiden.

Methods
Reader Method: consumers ((core core))

automatically generated reader method

Source

core.lisp.

Target Slot

consumers.

Generic Writer: (setf consumers) (object)
Package

maiden.

Methods
Writer Method: (setf consumers) ((core core))

automatically generated writer method

Source

core.lisp.

Target Slot

consumers.

Generic Function: core (condition)

Accessor to the core that this object holds.

See CORE-CONDITION

Package

maiden.

Methods
Method: core ((event event))
Source

event.lisp.

Reader Method: core ((condition core-condition))
Source

conditions.lisp.

Target Slot

core.

Generic Reader: core-handlers (object)
Package

maiden.

Methods
Reader Method: core-handlers ((consumer consumer))

automatically generated reader method

Source

consumer.lisp.

Target Slot

core-handlers.

Generic Writer: (setf core-handlers) (object)
Package

maiden.

Methods
Writer Method: (setf core-handlers) ((consumer consumer))

automatically generated writer method

Source

consumer.lisp.

Target Slot

core-handlers.

Generic Reader: cores (object)

Accessor to the list of cores the consumer is currently registered with.

See CONSUMER

Package

maiden.

Methods
Reader Method: cores ((consumer consumer))

automatically generated reader method

Source

consumer.lisp.

Target Slot

cores.

Generic Writer: (setf cores) (object)
Package

maiden.

Methods
Writer Method: (setf cores) ((consumer consumer))

automatically generated writer method

Source

consumer.lisp.

Target Slot

cores.

Generic Reader: data (object)

Accessor to the data storage container for the data entity.

See DATA-ENTITY
See DATA-VALUE

Package

maiden.

Methods
Reader Method: data ((data-entity data-entity))

automatically generated reader method

Source

entity.lisp.

Target Slot

data.

Generic Writer: (setf data) (object)
Package

maiden.

Methods
Writer Method: (setf data) ((data-entity data-entity))

automatically generated writer method

Source

entity.lisp.

Target Slot

data.

Generic Function: data-value (field entity)

Accessor for a single data field in the data entity.

See DATA
See DATA-ENTITY

Package

maiden.

Methods
Method: data-value (field (entity data-entity))
Source

entity.lisp.

Generic Function: (setf data-value) (field entity)
Package

maiden.

Methods
Method: (setf data-value) (field (entity data-entity))
Source

entity.lisp.

Generic Reader: direct-handlers (object)

Accessor to the list of direct handler definitions on the consumer class.

This only holds handler definitions that have been defined for
this specific class directly.
Also note that the handler objects contained in this list are
only abstract-handler instances and cannot be directly used as handlers.

When this place is set, the consumer-class’ inheritance is
finalized.

See CONSUMER-CLASS
See ABSTRACT-HANDLER
See MOP:FINALIZE-INHERITANCE

Package

maiden.

Methods
Reader Method: direct-handlers ((consumer-class consumer-class))

automatically generated reader method

Source

consumer.lisp.

Target Slot

direct-handlers.

Generic Function: (setf direct-handlers) (object)
Package

maiden.

Methods
Writer Method: (setf direct-handlers) :after ((class consumer-class))
Source

consumer.lisp.

Target Slot

direct-handlers.

Method: (setf direct-handlers) ((consumer-class consumer-class))

automatically generated writer method

Source

consumer.lisp.

Generic Reader: effective-handlers (object)

Accessor to the list of effective handler definitions on the consumer class.

This holds all handler definitions, including inherited ones.
Note that the handler objects contained in this list are only abstract-handler instances and cannot be directly used as
handlers.

When this place is set, the list of INSTANCES is updated and
each existing instance is reinitialised through REINITIALIZE-
HANDLERS.

See CONSUMER-CLASS
See ABSTRACT-HANDLER
See INSTANCES
See REINITIALIZE-HANDLERS

Package

maiden.

Methods
Reader Method: effective-handlers ((consumer-class consumer-class))

automatically generated reader method

Source

consumer.lisp.

Target Slot

effective-handlers.

Generic Function: (setf effective-handlers) (object)
Package

maiden.

Methods
Writer Method: (setf effective-handlers) :after ((class consumer-class))
Source

consumer.lisp.

Target Slot

effective-handlers.

Method: (setf effective-handlers) ((consumer-class consumer-class))

automatically generated writer method

Source

consumer.lisp.

Generic Reader: existing-agent (condition)

Reader for the agent that already exists on the core.

See AGENT-ALREADY-EXISTS-ERROR

Package

maiden.

Methods
Reader Method: existing-agent ((condition agent-already-exists-error))
Source

conditions.lisp.

Target Slot

existing-agent.

Generic Reader: existing-consumer (condition)

Reader for the consumer that previously already existed on the core.

See CONSUMER-NAME-DUPLICATED-WARNING

Package

maiden.

Methods
Reader Method: existing-consumer ((condition consumer-name-duplicated-warning))
Source

conditions.lisp.

Target Slot

existing-consumer.

Generic Reader: id (object)

Accessor to the IDentity of an entity.

By default this is initialised to a fresh UUIDv4 string.

See ENTITY

Package

maiden.

Methods
Reader Method: id ((entity entity))

automatically generated reader method

Source

entity.lisp.

Target Slot

id.

Generic Writer: (setf id) (object)
Package

maiden.

Methods
Writer Method: (setf id) ((entity entity))

automatically generated writer method

Source

entity.lisp.

Target Slot

id.

Generic Reader: instances (object)

Accessor to the list of weak-pointers to consumer instances.

The elements in the list are instances of TG:WEAK-POINTER and may point to instances of the consumer class. This list is necessary to keep track of and properly synchronise the handlers upon redefinition.

This list is updated whenever a new CONSUMER instance is created or when EFFECTIVE-HANDLERS of its class is set.

See TG:WEAK-POINTER
See CONSUMER

Package

maiden.

Methods
Reader Method: instances ((consumer-class consumer-class))

automatically generated reader method

Source

consumer.lisp.

Target Slot

instances.

Generic Writer: (setf instances) (object)
Package

maiden.

Methods
Writer Method: (setf instances) ((consumer-class consumer-class))

automatically generated writer method

Source

consumer.lisp.

Target Slot

instances.

Generic Function: instantiate-handler (handler consumer)

This function creates an actual handler instance from the abstract handler definition.

The instantiation proceeds as follows:
1. The options :FILTER, :DELIVERY-FUNCTION, and :MATCH-CONSUMER
are extracted from the options list.
2. If :MATCH-CONSUMER is given and is eql to T, then the :FILTER
option is extended by surrounding it as follows:
(and (eq ,consumer consumer) ..)
where ,consumer denotes the consumer instance passed to
instantiate-handler.
3. If :MATCH-CONSUMER is given and is not eql to T, then the :FILTER
option is extended by surrounding it as follows:
(and (eq ,consumer ,match-consumer) ..)
where ,consumer is as above and ,match-consumer is the value of
the :MATCH-CONSUMER option.
4. MAKE-INSTANCE is called with the TARGET-CLASS of the abstract
handler, a :delivery-function initarg that is a function that
calls the :DELIVERY-FUNCTION extracted from the option with the
consumer and the event, a :filter initarg that is the value of
the :FILTER option, and the rest of the OPTIONS of the abstract
handler.

See ABSTRACT-HANDLER

Package

maiden.

Methods
Method: instantiate-handler ((handler abstract-handler) (consumer consumer))
Source

consumer.lisp.

Generic Reader: lock (object)

Accessor to the lock that is used to synchronise access to this object.

See CONSUMER

Package

maiden.

Methods
Reader Method: lock ((consumer consumer))

automatically generated reader method

Source

consumer.lisp.

Target Slot

event-loop-lock.

Generic Writer: (setf lock) (object)
Package

maiden.

Methods
Writer Method: (setf lock) ((consumer consumer))

automatically generated writer method

Source

consumer.lisp.

Target Slot

event-loop-lock.

Generic Function: matches (a b)

Generic comparator operator.

This compares in a potentially ambiguous "dwim" sense. Various components in the system add methods to make the matching work as much as expected as possible.

Package

maiden.

Source

entity.lisp.

Methods
Method: matches ((a symbol) (b agent))
Source

agent.lisp.

Method: matches ((a agent) (b symbol))
Source

agent.lisp.

Method: matches ((a agent) (b agent))
Source

agent.lisp.

Method: matches ((entity named-entity) b)
Method: matches (a (entity entity))
Method: matches ((entity entity) b)
Method: matches ((a entity) (b entity))
Method: matches ((a vector) (b vector))
Method: matches ((a string) (b string))
Method: matches ((a list) (b list))
Method: matches ((a uuid) (b string))
Method: matches ((a uuid) (b vector))
Method: matches (a (uuid uuid))
Method: matches ((a uuid) (b uuid))
Method: matches (a b)
Generic Reader: new-consumer (condition)

Reader for the new consumer that is being added to the core.

See CONSUMER-NAME-DUPLICATED-WARNING

Package

maiden.

Methods
Reader Method: new-consumer ((condition consumer-name-duplicated-warning))
Source

conditions.lisp.

Target Slot

new-consumer.

Generic Reader: options (object)

Accessor to the list of initargs that the handler should receive upon instantiation.

See ABSTRACT-HANDLER

Package

maiden.

Methods
Reader Method: options ((abstract-handler abstract-handler))

automatically generated reader method

Source

consumer.lisp.

Target Slot

options.

Generic Writer: (setf options) (object)
Package

maiden.

Methods
Writer Method: (setf options) ((abstract-handler abstract-handler))

automatically generated writer method

Source

consumer.lisp.

Target Slot

options.

Generic Reader: primary-loop (object)

Accessor to the primary loop of the Maiden core.

This should take care of the bulk of handlers and events.

See CORE

Package

maiden.

Methods
Reader Method: primary-loop ((core core))

automatically generated reader method

Source

core.lisp.

Target Slot

primary-loop.

Generic Writer: (setf primary-loop) (object)
Package

maiden.

Methods
Writer Method: (setf primary-loop) ((core core))

automatically generated writer method

Source

core.lisp.

Target Slot

primary-loop.

Generic Function: remove-consumer (consumer target)

Remove the consumer from the core.

If the consumer doesn’t exist on the core, nothing is done. Otherwise the consumer is removed from the core’s list.

If a consumer has been removed, an event of type CONSUMER- REMOVED is issued onto the core.

See CONSUMER-REMOVED

Package

maiden.

Source

core.lisp.

Methods
Method: remove-consumer (id (core core))
Method: remove-consumer (consumer (targets list))
Method: remove-consumer ((consumers list) target)
Method: remove-consumer :around (consumer target)
Method: remove-consumer :after ((consumer consumer) (core core))
Source

consumer.lisp.

Method: remove-consumer ((consumer consumer) (everywhere (eql t)))
Source

consumer.lisp.

Generic Function: respond (event &key payload class &allow-other-keys)

Respond to the event in an appropriate way.

The response event will be issued on to the same core that the event being responded to was issued to. If the event does not have a specific response event already (through a specialised method on RESPOND), then you may specify the class to use with the :CLASS initarg.

Package

maiden.

Source

standard-events.lisp.

Methods
Method: respond ((event query-event) &key payload)
Method: respond ((event client-event) &rest args &key class &allow-other-keys)
Method: respond ((event event) &rest args &key class &allow-other-keys)
Generic Reader: target-class (object)

Accessor to the target class that the actual handler should be of when the abstract-handler is instantiated.

Defaults to DEEDS:QUEUED-HANDLER

See ABSTRACT-HANDLER
See DEEDS:QUEUED-HANDLER

Package

maiden.

Methods
Reader Method: target-class ((abstract-handler abstract-handler))

automatically generated reader method

Source

consumer.lisp.

Target Slot

target-class.

Generic Writer: (setf target-class) (object)
Package

maiden.

Methods
Writer Method: (setf target-class) ((abstract-handler abstract-handler))

automatically generated writer method

Source

consumer.lisp.

Target Slot

target-class.


5.1.5 Standalone methods

Method: deregister-handler (handler (core core))
Package

deeds.

Source

core.lisp.

Method: finalize-inheritance :after ((class consumer-class))
Package

sb-mop.

Source

consumer.lisp.

Method: finalize-inheritance :after ((class event-class))
Package

sb-mop.

Source

event.lisp.

Method: handle :around ((event event) (delivery event-delivery))
Package

deeds.

Source

core.lisp.

Method: handle ((event event) (core core))
Package

deeds.

Source

core.lisp.

Method: (setf handler) ((event-loop event-loop))
Package

deeds.

Source

consumer.lisp.

Method: handler ((consumer consumer) (event-loop event-loop))
Package

deeds.

Source

consumer.lisp.

Method: (setf handler) ((core core))
Package

deeds.

Source

core.lisp.

Method: handler (id (core core))
Package

deeds.

Source

core.lisp.

Method: initialize-instance :after ((consumer consumer) &key)
Source

consumer.lisp.

Method: initialize-instance :after ((handler abstract-handler) &rest args &key target-class &allow-other-keys)
Source

consumer.lisp.

Method: initialize-instance :after ((agent agent) &key)
Source

agent.lisp.

Method: issue ((event event) (core core))
Package

deeds.

Source

core.lisp.

Method: issue :before ((event event) (core core))
Package

deeds.

Source

core.lisp.

Writer Method: (setf name) ((abstract-handler abstract-handler))

automatically generated writer method

Package

deeds.

Source

consumer.lisp.

Target Slot

name.

Reader Method: name ((abstract-handler abstract-handler))

automatically generated reader method

Package

deeds.

Source

consumer.lisp.

Target Slot

name.

Writer Method: (setf name) ((named-entity named-entity))

automatically generated writer method

Package

deeds.

Source

entity.lisp.

Target Slot

name.

Reader Method: name ((named-entity named-entity))

automatically generated reader method

Package

deeds.

Source

entity.lisp.

Target Slot

name.

Method: print-object ((entity entity) stream)
Source

entity.lisp.

Method: print-object ((event consumer-removed) stream)
Source

standard-events.lisp.

Method: print-object ((agent agent) stream)
Source

agent.lisp.

Method: print-object ((event consumer-added) stream)
Source

standard-events.lisp.

Method: print-object ((named-entity named-entity) stream)
Source

entity.lisp.

Method: register-handler (handler (core core))
Package

deeds.

Source

core.lisp.

Method: running ((core core))
Package

deeds.

Source

core.lisp.

Method: start :after ((consumer consumer))
Package

deeds.

Source

consumer.lisp.

Method: start ((core core))
Package

deeds.

Source

core.lisp.

Method: stop :after ((consumer consumer))
Package

deeds.

Source

consumer.lisp.

Method: stop ((core core))
Package

deeds.

Source

core.lisp.

Method: validate-superclass ((class consumer-class) (superclass consumer-class))
Package

sb-mop.

Source

consumer.lisp.

Method: validate-superclass ((class consumer-class) (superclass standard-class))
Package

sb-mop.

Source

consumer.lisp.

Method: validate-superclass ((class standard-class) (superclass consumer-class))
Package

sb-mop.

Source

consumer.lisp.

Method: validate-superclass ((class consumer-class) superclass)
Package

sb-mop.

Source

consumer.lisp.


5.1.6 Conditions

Condition: agent-already-exists-error

A condition signalled when an agent of the same name already exists on the core.

See EXISTING-AGENT
See AGENT-CONDITION
See CORE-CONDITION

Package

maiden.

Source

conditions.lisp.

Direct superclasses
Direct methods

existing-agent.

Direct Default Initargs
InitargValue
:existing-agent(error existing-agent required.)
Direct slots
Slot: existing-agent
Initargs

:existing-agent

Readers

existing-agent.

Writers

This slot is read-only.

Condition: agent-condition

Superclass for all conditions related to agents.

See AGENT
See MAIDEN-CONDITION

Package

maiden.

Source

conditions.lisp.

Direct superclasses

maiden-condition.

Direct subclasses

agent-already-exists-error.

Direct methods

agent.

Direct Default Initargs
InitargValue
:agent(error agent required.)
Direct slots
Slot: agent
Initargs

:agent

Readers

agent.

Writers

This slot is read-only.

Condition: client-condition

Superclass for all conditions related to clients.

See CLIENT
See MAIDEN-CONDITION

Package

maiden.

Source

conditions.lisp.

Direct superclasses

maiden-condition.

Direct methods

client.

Direct Default Initargs
InitargValue
:client(error client required.)
Direct slots
Slot: client
Initargs

:client

Readers

client.

Writers

This slot is read-only.

Condition: consumer-name-duplicated-warning

A condition signalled when a consumer is added to a core and has the same name as an already existing consumer.

See EXISTING-CONSUMER
See NEW-CONSUMER
See CORE-CONDITION

Package

maiden.

Source

conditions.lisp.

Direct superclasses
Direct methods
Direct Default Initargs
InitargValue
:new-consumer(error new-consumer required.)
:existing-consumer(error existing-consumer required.)
Direct slots
Slot: existing-consumer
Initargs

:existing-consumer

Readers

existing-consumer.

Writers

This slot is read-only.

Slot: new-consumer
Initargs

:new-consumer

Readers

new-consumer.

Writers

This slot is read-only.

Condition: core-condition

Superclass for all conditions related to operations on a core.

See CORE
See MAIDEN-CONDITION

Package

maiden.

Source

conditions.lisp.

Direct superclasses

maiden-condition.

Direct subclasses
Direct methods

core.

Direct Default Initargs
InitargValue
:core(error core required.)
Direct slots
Slot: core
Initargs

:core

Readers

core.

Writers

This slot is read-only.

Condition: maiden-condition

Superclass for all condition types in the Maiden system.

Package

maiden.

Source

conditions.lisp.

Direct superclasses

condition.

Direct subclasses

5.1.7 Classes

Class: abstract-handler

This is an object to represent a handler definition. It contains all data necessary to construct an appropriate handler instance for a consumer.

See ADD-TO-CONSUMER
See TARGET-CLASS
See OPTIONS
See INSTANTIATE-HANDLER
See DEFINE-HANDLER

Package

maiden.

Source

consumer.lisp.

Direct methods
Direct Default Initargs
InitargValue
:optionsnil
:add-to-consumert
Direct slots
Slot: target-class
Initform

(quote deeds:locally-blocking-handler)

Readers

target-class.

Writers

(setf target-class).

Slot: add-to-consumer
Initargs

:add-to-consumer

Readers

add-to-consumer.

Writers

(setf add-to-consumer).

Slot: options
Initargs

:options

Readers

options.

Writers

(setf options).

Slot: name
Package

deeds.

Initargs

:name

Readers

name.

Writers

(setf name).

Class: active-event

Superclass for all active events in the system.

An active event notifies of a request for an action to be taken somewhere in the system. It is active in the sense that it should cause some part of the system to perform an action, rather than merely notifying of a change happening.

See EVENT
See PASSIVE-EVENT

Package

maiden.

Source

standard-events.lisp.

Direct superclasses

event.

Direct subclasses

instruction-event.

Class: agent

A type of consumer of which only one instance should exist on a core.

An agent’s name defaults to the agent’s class name.

An agent MATCHES if the class or the class name matches.

If an agent is attempted to be added to a core when an
agent that matches it by name already exists on the core,
a warning of type AGENT-ALREADY-EXISTS-ERROR is signalled.

See CONSUMER

Package

maiden.

Source

agent.lisp.

Direct superclasses

consumer.

Direct methods
Class: block-loop

Base class for the block loop on a Maiden core.

See CORE
See DEEDS:EVENT-LOOP

Package

maiden.

Source

core.lisp.

Direct superclasses

event-loop.

Class: client

A type of consumer of which multiple instances can exist on a core.

See CONSUMER

Package

maiden.

Source

client.lisp.

Direct superclasses

consumer.

Class: client-event

Superclass for all events that relate to a client.

This event holds the client it relates to in a slot.

See CLIENT
See EVENT

Package

maiden.

Source

standard-events.lisp.

Direct superclasses

event.

Direct methods
Direct Default Initargs
InitargValue
:client(error client required.)
Direct slots
Slot: client
Initargs

:client

Readers

client.

Writers

This slot is read-only.

Class: consumer

Superclass for all consumers on a core.

Consumers are responsible for issuing and responding to events that happen on a core. They do this by having a number of handler definitions tied to them, which are instantiated into proper handlers for each consumer instance. Consumers can have handlers that are registered directly on the consumer or are instead added to the core the consumer is being added to. The former allows the grouping of handlers and a more granular management of resources, whereas the latter allows you to circumvent potential bottleneck or ordering issues. See the Deeds library for information on how the event-loop and handlers work in detail.

Consumers are divided into two classes, ones of which only a single instance should exist on the core, and ones of which many may exist on the core. The former are called AGENTS, and the latter are called CLIENTS. The former usually provide functionality that is reactionary in some sense. The latter usually provide some form of connection to another entity and primarily provide events rather than consuming them. You should not inherit directly from CONSUMER therefore, and rather pick either CLIENT or AGENT, depending on which of the two is more suitable for the kind of consumer you want to write for the system.

Consumer classes must inherit from the CONSUMER-CLASS class, which is responsible for ensuring that handler definitions get properly instantiated and managed over consumer instances.

In order to easily define consumer classes with the appropriate superclass and metaclass, you can use DEFINE-CONSUMER.

In order to add handlers to the consumer, use DEFINE-HANDLER.

Each consumer has a LOCK that can be used to synchronise access to the consumer from different parts in the system. Since Deeds, and Maiden by extension, is highly parallel most of the time, locking of resources and access to the consumer from different handlers is vital.

The list of handler instances is held in the HANDLERS slot. The list of handlers that are tied directly to cores is held in the CORE-HANDLERS slot. The list of cores the consumer is on is held in the CORES slot.

You can start and stop all the handlers on a consumer by the usual Deeds START and STOP functions.

After the initialisation of a consumer, the consumer instance is pushed onto the INSTANCES list of its class by way of a weak-pointer. It will also turn all of its effective-handlers into actual handler instances by way of INSTANTIATE-HANDLER and push them onto its HANDLERS list.

See NAMED-ENTITY
See COMPILED-EVENT-LOOP
See HANDLER
See CONSUMER-CLASS
See AGENT
See CLIENT
See DEFINE-CONSUMER
See DEFINE-HANDLER
See HANDLERS
See CORE-HANDLERS
See CORES
See LOCK
See START
See STOP
See INSTANCES
See INSTANTIATE-HANDLER

Package

maiden.

Source

consumer.lisp.

Direct superclasses
Direct subclasses
Direct methods
Direct slots
Slot: cores
Readers

cores.

Writers

(setf cores).

Slot: core-handlers
Readers

core-handlers.

Writers

(setf core-handlers).

Slot: event-loop-lock
Package

deeds.

Readers

lock.

Writers

(setf lock).

Class: consumer-added

Event that is issued after a consumer has been added to the core.

See CORE-EVENT
See CONSUMER

Package

maiden.

Source

standard-events.lisp.

Direct superclasses
Direct methods

print-object.

Direct Default Initargs
InitargValue
:consumer(error consumer required.)
Direct slots
Slot: consumer
Initargs

:consumer

Class: consumer-class

Metaclass for all consumer objects.

It handles the proper instantiation of handler objects when the consumer is added to a core or the handler definitions are updated.

See DIRECT-HANDLERS
See EFFECTIVE-HANDLERS
See INSTANCES
See CONSUMER

Package

maiden.

Source

consumer.lisp.

Direct superclasses

standard-class.

Direct methods
Direct slots
Slot: direct-handlers
Readers

direct-handlers.

Writers

(setf direct-handlers).

Slot: effective-handlers
Readers

effective-handlers.

Writers

(setf effective-handlers).

Slot: instances
Readers

instances.

Writers

(setf instances).

Class: consumer-removed

Event that is issued after a consumer has been removed from the core.

See CORE-EVENT
See CONSUMER

Package

maiden.

Source

standard-events.lisp.

Direct superclasses
Direct methods

print-object.

Direct Default Initargs
InitargValue
:consumer(error consumer required.)
Direct slots
Slot: consumer
Initargs

:consumer

Class: core

The core of an event system in Maiden.

The core is responsible for managing events, consumers, and their handlers. It uses two (!) event-loops in the back to handle event delivery. The first loop, called the primary loop is where most handlers live. It is (by default) of type PRIMARY-LOOP and should be fairly speed in delivery, at the cost that adding and removing handlers will be slow. The second loop, called the blocking loop is where temporary handlers that only exist for hopefully a short time live. It is (by default) of type BLOCK-LOOP and is not optimised for fast delivery, but much faster at removing and adding handlers. Thus, whenever you wait for an event for a one-time request, the handler should be added to the block loop.

Calling DE/REGISTER-HANDLER on a core will automatically add it to the primary loop. If you want to change the blocking loop you will have to access it directly.

When an event is ISSUEd onto the core, it is ISSUEd onto the primary loop and then ISSUEd onto the block loop. The behaviour for when an event is directly HANDLEd by the core is analogous.

See PRIMARY-LOOP
See BLOCK-LOOP
See CONSUMERS
See CONSUMER
See ADD-CONSUMER
See REMOVE-CONSUMER
See START
See STOP
See ISSUE
See HANDLE
See WITH-AWAITING
See WITH-RESPONSE
See MAKE-CORE
See ADD-TO-CORE

Package

maiden.

Source

core.lisp.

Direct superclasses

named-entity.

Direct methods
Direct Default Initargs
InitargValue
:primary-loop(make-instance (quote primary-loop))
:block-loop(make-instance (quote block-loop))
Direct slots
Slot: primary-loop
Initargs

:primary-loop

Readers

primary-loop.

Writers

(setf primary-loop).

Slot: block-loop
Initargs

:block-loop

Readers

block-loop.

Writers

(setf block-loop).

Slot: consumers
Readers

consumers.

Writers

(setf consumers).

Class: core-event

Superclass for all events relating to a Maiden core.

See EVENT

Package

maiden.

Source

standard-events.lisp.

Direct superclasses

event.

Direct subclasses
Class: data-entity

Superclass for entities that have a data storage table.

See ENTITY
See DATA
See DATA-VALUE

Package

maiden.

Source

entity.lisp.

Direct superclasses

entity.

Direct methods
Direct slots
Slot: data
Initform

(make-hash-table :test (quote equal))

Readers

data.

Writers

(setf data).

Class: entity

Superclass for things that are comparable according to some kind of identity.

See ID

Package

maiden.

Source

entity.lisp.

Direct subclasses
Direct methods
Direct Default Initargs
InitargValue
:id(princ-to-string (make-v4-uuid))
Direct slots
Slot: id
Initargs

:id

Readers

id.

Writers

(setf id).

Class: event

The superclass for all events in Maiden.

An event is an object that represents a change that occurs in the system. It may also carry relevant information about the change. Events can also be used to signify requests for things to happen in the system.

Events need to be ISSUEd onto a core, where they will then be dispatched to HANDLERs that can process it.

See EVENT-CLASS
See CORE
See DEEDS:EVENT
See DEFINE-EVENT

Package

maiden.

Source

event.lisp.

Direct superclasses

event.

Direct subclasses
Direct methods
Class: instruction-event

Superclass for all instruction events in the system.

Instructions are event representations of a change request in the system. They often represent a "virtual" function call.

See DEFINE-INSTRUCTION
See ACTIVE-EVENT

Package

maiden.

Source

standard-events.lisp.

Direct superclasses

active-event.

Direct subclasses

query-event.

Class: named-entity

An entity with a human-readable name attached to it.

See ENTITY
See NAME

Package

maiden.

Source

entity.lisp.

Direct superclasses

entity.

Direct subclasses
Direct methods
Direct Default Initargs
InitargValue
:namenil
Direct slots
Slot: name
Package

deeds.

Initargs

:name

Readers

name.

Writers

(setf name).

Class: passive-event

Superclass for all passive events in the system.

A passive event notifies of a change that happened somewhere in the system. It is passive in the sense that it provides information, rather than explicitly requesting information or explicitly requesting an action.

See EVENT
See ACTIVE-EVENT

Package

maiden.

Source

standard-events.lisp.

Direct superclasses

event.

Direct subclasses
Class: primary-loop

Base class for the primary loop on a Maiden core.

See CORE
See DEEDS:COMPILED-EVENT-LOOP

Package

maiden.

Source

core.lisp.

Direct superclasses

compiled-event-loop.

Class: query-event

Superclass for all query events in the system.

Queries are events that represent both a change request and a request for a result to be obtained about the change. They often represent a "full" function call.

It is identified so that it and its response event counter- piece can be found.

See DEFINE-QUERY
See DEEDS:IDENTIFIED-EVENT
See INSTRUCTION-EVENT

Package

maiden.

Source

standard-events.lisp.

Direct superclasses
Direct methods

respond.

Class: response-event

Generic response event class.

This event is used to deliver the response payload of a query-event. Its IDentity must be the same as that of the query-event that prompted it.

See DEEDS:IDENTIFIED-EVENT
See DEEDS:PAYLOAD-EVENT
See PASSIVE-EVENT

Package

deeds.

Source

standard-events.lisp.

Direct superclasses
Direct Default Initargs
InitargValue
:identifier(error identifier required.)

5.2 Internals


5.2.1 Special variables

Special Variable: *unix-epoch-difference*

The difference in seconds between universal-time and unix-time.

Package

maiden.

Source

toolkit.lisp.


5.2.2 Ordinary functions

Function: args->initargs (args)

Converts a lambda-list into a plist to pass as initargs.

More specifically, each variable in the lambda list will be turned into a key-value pair where the key is the keyword corresponding to the symbol name, followed by the symbol itself.

Package

maiden.

Source

consumer.lisp.

Function: cascade-handler-changes (class)

This function computes the effective handlers list for the class and cascades the update downwards in the hierarchy.

Only subclasses that are a subclass of CONSUMER-CLASS and have
been finalized are cascaded.

The EFFECTIVE-HANDLERS list is updated as part of this.

See CONSUMER-CLASS
See EFFECTIVE-HANDLERS

Package

maiden.

Source

consumer.lisp.

Function: make-updated-list (thing list key test)

Construct an updated version of LIST where THING is either updated from its old value, or added to it.

The elements in the list are passed through KEY and then
compared against THING using the TEST function.

Package

maiden.

Source

toolkit.lisp.

Function: slot-args->args (args)

Converts a list of slot arguments into a lambda list.

See SLOT-ARGS->SLOTS

Package

maiden.

Source

consumer.lisp.

Function: slot-args->slots (args)

Converts a list of slot arguments into slot definitions.

The slot-args must be structured like a special kind of lambda-list:

SLOT-ARGS ::= REQ* (&optional OPT*)? (&REST REQ)? (&key OPT*)? REQ ::= name | (name SLOT-INITARG*)
OPT ::= name | (name default-value? SLOT-INITARG*) SLOT-INITARG ::= keyword value

In short:
There are no provided-p predicate variables for optional arguments, but each argument can be followed by a list of possible slot initargs if it is given as a list.

Each returned slot will also automatically receive an initarg of the same name as the slot, but from the keyword package.

Package

maiden.

Source

consumer.lisp.

Function: swank-connected-p ()
Package

maiden.

Source

toolkit.lisp.

Function: update-handler (abstract-handler class-ish)

This function is responsible for handling the redefinition of a handler on a consumer-class.

This function simply updates the list of direct-handlers
on the class by replacing the corresponding abstract-handler
or adding it to it.

The class-ish can be a CONSUMER-CLASS, a CONSUMER, or a
SYMBOL naming a consumer-class.

See DIRECT-HANDLERS
See ABSTRACT-HANDLER
See CONSUMER-CLASS

Package

maiden.

Source

consumer.lisp.

Function: update-root-for-image ()

This function attempts to update the *ROOT* to the current location of the image.

See UIOP:ARGV0

Package

maiden.

Source

toolkit.lisp.


5.2.3 Generic functions

Generic Reader: direct-advice (object)

Accessor to the advice information that was defined directly on the class.

See EVENT-CLASS

Package

maiden.

Methods
Reader Method: direct-advice ((event-class event-class))

automatically generated reader method

Source

event.lisp.

Target Slot

direct-advice.

Generic Writer: (setf direct-advice) (object)
Package

maiden.

Methods
Writer Method: (setf direct-advice) ((event-class event-class))

automatically generated writer method

Source

event.lisp.

Target Slot

direct-advice.

Generic Function: find-entity (id place)

Attempt to find an entity in a container.

The ID must be matched against each entity in the container by MATCHES.

See ENTITY
See MATCHES

Package

maiden.

Source

entity.lisp.

Methods
Method: find-entity (id (core core))
Source

core.lisp.

Method: find-entity (id (consumer consumer))
Source

consumer.lisp.

Method: find-entity (id (list list))
Method: find-entity (id (entity named-entity))
Generic Function: reinitialize-handlers (consumer handlers)

This handles the updating of handler definitions on a consumer.

The procedure is as follows:
1. All direct handlers are deregistered from the consumer.
2. New direct handlers are instantiated, started, and registered on the consumer.
3. The old direct handlers are stopped.
4. All core handlers are deregistered from all cores of the consumer. 5. New core handlers are instantiated, started, and registered on the cores.
6. The old core handlers are stopped.

See CONSUMER
See INSTANTIATE-HANDLER
See HANDLERS

Package

maiden.

Methods
Method: reinitialize-handlers ((consumer consumer) abstract-handlers)
Source

consumer.lisp.

Method: reinitialize-handlers :around ((consumer consumer) handlers)
Source

consumer.lisp.


5.2.4 Classes

Class: event-class

Metaclass for events.

In addition to the effects inherited from DEEDS:EVENT-CLASS, this class ads so-called "advice". Advice denotes advisory information about the event that may or may not be processed depending on whether there are any components that can make use of the advice.

The advice list is inherited through the class structure. Advice can also be inhibited for a class and its descendants by surrounding the advice item with a (NOT ..). Note that advice items are only tested for equality by EQL.

See DEEDS:EVENT-CLASS
See ADVICE
See DIRECT-ADVICE

Package

maiden.

Source

event.lisp.

Direct superclasses

event-class.

Direct methods
Direct Default Initargs
InitargValue
:direct-advicenil
Direct slots
Slot: effective-advice
Readers

advice.

Writers

(setf advice).

Slot: direct-advice
Initargs

:advice

Readers

direct-advice.

Writers

(setf direct-advice).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   H   I   K   L   M   N   O   P   R   S   T   U   V   W   X  
Index Entry  Section

(
(setf add-to-consumer): Public generic functions
(setf add-to-consumer): Public generic functions
(setf advice): Public generic functions
(setf advice): Public generic functions
(setf block-loop): Public generic functions
(setf block-loop): Public generic functions
(setf consumers): Public generic functions
(setf consumers): Public generic functions
(setf core-handlers): Public generic functions
(setf core-handlers): Public generic functions
(setf cores): Public generic functions
(setf cores): Public generic functions
(setf data): Public generic functions
(setf data): Public generic functions
(setf data-value): Public generic functions
(setf data-value): Public generic functions
(setf direct-advice): Private generic functions
(setf direct-advice): Private generic functions
(setf direct-handlers): Public generic functions
(setf direct-handlers): Public generic functions
(setf direct-handlers): Public generic functions
(setf effective-handlers): Public generic functions
(setf effective-handlers): Public generic functions
(setf effective-handlers): Public generic functions
(setf handler): Public standalone methods
(setf handler): Public standalone methods
(setf id): Public generic functions
(setf id): Public generic functions
(setf instances): Public generic functions
(setf instances): Public generic functions
(setf lock): Public generic functions
(setf lock): Public generic functions
(setf name): Public standalone methods
(setf name): Public standalone methods
(setf options): Public generic functions
(setf options): Public generic functions
(setf primary-loop): Public generic functions
(setf primary-loop): Public generic functions
(setf target-class): Public generic functions
(setf target-class): Public generic functions

A
add-consumer: Public generic functions
add-consumer: Public generic functions
add-consumer: Public generic functions
add-consumer: Public generic functions
add-consumer: Public generic functions
add-consumer: Public generic functions
add-consumer: Public generic functions
add-to-consumer: Public generic functions
add-to-consumer: Public generic functions
add-to-core: Public ordinary functions
advice: Public generic functions
advice: Public generic functions
advice: Public generic functions
agent: Public generic functions
agent: Public generic functions
args->initargs: Private ordinary functions

B
block-loop: Public generic functions
block-loop: Public generic functions
broadcast: Public ordinary functions

C
cascade-handler-changes: Private ordinary functions
client: Public generic functions
client: Public generic functions
client: Public generic functions
consumer: Public generic functions
consumer: Public generic functions
consumer: Public generic functions
consumers: Public generic functions
consumers: Public generic functions
core: Public generic functions
core: Public generic functions
core: Public generic functions
core-handlers: Public generic functions
core-handlers: Public generic functions
cores: Public generic functions
cores: Public generic functions

D
data: Public generic functions
data: Public generic functions
data-value: Public generic functions
data-value: Public generic functions
define-consumer: Public macros
define-event: Public macros
define-function-handler: Public macros
define-handler: Public macros
define-instruction: Public macros
define-query: Public macros
deregister-handler: Public standalone methods
direct-advice: Private generic functions
direct-advice: Private generic functions
direct-handlers: Public generic functions
direct-handlers: Public generic functions
do-issue: Public macros

E
effective-handlers: Public generic functions
effective-handlers: Public generic functions
enlist: Public ordinary functions
existing-agent: Public generic functions
existing-agent: Public generic functions
existing-consumer: Public generic functions
existing-consumer: Public generic functions

F
finalize-inheritance: Public standalone methods
finalize-inheritance: Public standalone methods
find-consumer-in-package: Public ordinary functions
find-entity: Private generic functions
find-entity: Private generic functions
find-entity: Private generic functions
find-entity: Private generic functions
find-entity: Private generic functions
format-absolute-time: Public ordinary functions
format-relative-time: Public ordinary functions
format-time: Public ordinary functions
Function, add-to-core: Public ordinary functions
Function, args->initargs: Private ordinary functions
Function, broadcast: Public ordinary functions
Function, cascade-handler-changes: Private ordinary functions
Function, enlist: Public ordinary functions
Function, find-consumer-in-package: Public ordinary functions
Function, format-absolute-time: Public ordinary functions
Function, format-relative-time: Public ordinary functions
Function, format-time: Public ordinary functions
Function, get-unix-time: Public ordinary functions
Function, kw: Public ordinary functions
Function, make-core: Public ordinary functions
Function, make-updated-list: Private ordinary functions
Function, maybe-invoke-debugger: Public ordinary functions
Function, remove-function-handler: Public ordinary functions
Function, remove-handler: Public ordinary functions
Function, remove-instruction: Public ordinary functions
Function, remove-query: Public ordinary functions
Function, slot-args->args: Private ordinary functions
Function, slot-args->slots: Private ordinary functions
Function, starts-with: Public ordinary functions
Function, swank-connected-p: Private ordinary functions
Function, universal-to-unix: Public ordinary functions
Function, unix-to-universal: Public ordinary functions
Function, unlist: Public ordinary functions
Function, update-handler: Private ordinary functions
Function, update-root-for-image: Private ordinary functions
Function, xnor: Public ordinary functions
Function, xor: Public ordinary functions

G
Generic Function, (setf add-to-consumer): Public generic functions
Generic Function, (setf advice): Public generic functions
Generic Function, (setf block-loop): Public generic functions
Generic Function, (setf consumers): Public generic functions
Generic Function, (setf core-handlers): Public generic functions
Generic Function, (setf cores): Public generic functions
Generic Function, (setf data): Public generic functions
Generic Function, (setf data-value): Public generic functions
Generic Function, (setf direct-advice): Private generic functions
Generic Function, (setf direct-handlers): Public generic functions
Generic Function, (setf effective-handlers): Public generic functions
Generic Function, (setf id): Public generic functions
Generic Function, (setf instances): Public generic functions
Generic Function, (setf lock): Public generic functions
Generic Function, (setf options): Public generic functions
Generic Function, (setf primary-loop): Public generic functions
Generic Function, (setf target-class): Public generic functions
Generic Function, add-consumer: Public generic functions
Generic Function, add-to-consumer: Public generic functions
Generic Function, advice: Public generic functions
Generic Function, agent: Public generic functions
Generic Function, block-loop: Public generic functions
Generic Function, client: Public generic functions
Generic Function, consumer: Public generic functions
Generic Function, consumers: Public generic functions
Generic Function, core: Public generic functions
Generic Function, core-handlers: Public generic functions
Generic Function, cores: Public generic functions
Generic Function, data: Public generic functions
Generic Function, data-value: Public generic functions
Generic Function, direct-advice: Private generic functions
Generic Function, direct-handlers: Public generic functions
Generic Function, effective-handlers: Public generic functions
Generic Function, existing-agent: Public generic functions
Generic Function, existing-consumer: Public generic functions
Generic Function, find-entity: Private generic functions
Generic Function, id: Public generic functions
Generic Function, instances: Public generic functions
Generic Function, instantiate-handler: Public generic functions
Generic Function, lock: Public generic functions
Generic Function, matches: Public generic functions
Generic Function, new-consumer: Public generic functions
Generic Function, options: Public generic functions
Generic Function, primary-loop: Public generic functions
Generic Function, reinitialize-handlers: Private generic functions
Generic Function, remove-consumer: Public generic functions
Generic Function, respond: Public generic functions
Generic Function, target-class: Public generic functions
get-unix-time: Public ordinary functions

H
handle: Public standalone methods
handle: Public standalone methods
handler: Public standalone methods
handler: Public standalone methods

I
id: Public generic functions
id: Public generic functions
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
instances: Public generic functions
instances: Public generic functions
instantiate-handler: Public generic functions
instantiate-handler: Public generic functions
issue: Public standalone methods
issue: Public standalone methods

K
kw: Public ordinary functions

L
lock: Public generic functions
lock: Public generic functions

M
Macro, define-consumer: Public macros
Macro, define-event: Public macros
Macro, define-function-handler: Public macros
Macro, define-handler: Public macros
Macro, define-instruction: Public macros
Macro, define-query: Public macros
Macro, do-issue: Public macros
Macro, named-lambda: Public macros
Macro, update-list: Public macros
Macro, with-awaiting: Public macros
Macro, with-default-encoding: Public macros
Macro, with-retry-restart: Public macros
make-core: Public ordinary functions
make-updated-list: Private ordinary functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
matches: Public generic functions
maybe-invoke-debugger: Public ordinary functions
Method, (setf add-to-consumer): Public generic functions
Method, (setf advice): Public generic functions
Method, (setf block-loop): Public generic functions
Method, (setf consumers): Public generic functions
Method, (setf core-handlers): Public generic functions
Method, (setf cores): Public generic functions
Method, (setf data): Public generic functions
Method, (setf data-value): Public generic functions
Method, (setf direct-advice): Private generic functions
Method, (setf direct-handlers): Public generic functions
Method, (setf direct-handlers): Public generic functions
Method, (setf effective-handlers): Public generic functions
Method, (setf effective-handlers): Public generic functions
Method, (setf handler): Public standalone methods
Method, (setf handler): Public standalone methods
Method, (setf id): Public generic functions
Method, (setf instances): Public generic functions
Method, (setf lock): Public generic functions
Method, (setf name): Public standalone methods
Method, (setf name): Public standalone methods
Method, (setf options): Public generic functions
Method, (setf primary-loop): Public generic functions
Method, (setf target-class): Public generic functions
Method, add-consumer: Public generic functions
Method, add-consumer: Public generic functions
Method, add-consumer: Public generic functions
Method, add-consumer: Public generic functions
Method, add-consumer: Public generic functions
Method, add-consumer: Public generic functions
Method, add-to-consumer: Public generic functions
Method, advice: Public generic functions
Method, advice: Public generic functions
Method, agent: Public generic functions
Method, block-loop: Public generic functions
Method, client: Public generic functions
Method, client: Public generic functions
Method, consumer: Public generic functions
Method, consumer: Public generic functions
Method, consumers: Public generic functions
Method, core: Public generic functions
Method, core: Public generic functions
Method, core-handlers: Public generic functions
Method, cores: Public generic functions
Method, data: Public generic functions
Method, data-value: Public generic functions
Method, deregister-handler: Public standalone methods
Method, direct-advice: Private generic functions
Method, direct-handlers: Public generic functions
Method, effective-handlers: Public generic functions
Method, existing-agent: Public generic functions
Method, existing-consumer: Public generic functions
Method, finalize-inheritance: Public standalone methods
Method, finalize-inheritance: Public standalone methods
Method, find-entity: Private generic functions
Method, find-entity: Private generic functions
Method, find-entity: Private generic functions
Method, find-entity: Private generic functions
Method, handle: Public standalone methods
Method, handle: Public standalone methods
Method, handler: Public standalone methods
Method, handler: Public standalone methods
Method, id: Public generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, instances: Public generic functions
Method, instantiate-handler: Public generic functions
Method, issue: Public standalone methods
Method, issue: Public standalone methods
Method, lock: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, matches: Public generic functions
Method, name: Public standalone methods
Method, name: Public standalone methods
Method, new-consumer: Public generic functions
Method, options: Public generic functions
Method, primary-loop: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, register-handler: Public standalone methods
Method, reinitialize-handlers: Private generic functions
Method, reinitialize-handlers: Private generic functions
Method, remove-consumer: Public generic functions
Method, remove-consumer: Public generic functions
Method, remove-consumer: Public generic functions
Method, remove-consumer: Public generic functions
Method, remove-consumer: Public generic functions
Method, remove-consumer: Public generic functions
Method, respond: Public generic functions
Method, respond: Public generic functions
Method, respond: Public generic functions
Method, running: Public standalone methods
Method, start: Public standalone methods
Method, start: Public standalone methods
Method, stop: Public standalone methods
Method, stop: Public standalone methods
Method, target-class: Public generic functions
Method, validate-superclass: Public standalone methods
Method, validate-superclass: Public standalone methods
Method, validate-superclass: Public standalone methods
Method, validate-superclass: Public standalone methods

N
name: Public standalone methods
name: Public standalone methods
named-lambda: Public macros
new-consumer: Public generic functions
new-consumer: Public generic functions

O
options: Public generic functions
options: Public generic functions

P
primary-loop: Public generic functions
primary-loop: Public generic functions
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods

R
register-handler: Public standalone methods
reinitialize-handlers: Private generic functions
reinitialize-handlers: Private generic functions
reinitialize-handlers: Private generic functions
remove-consumer: Public generic functions
remove-consumer: Public generic functions
remove-consumer: Public generic functions
remove-consumer: Public generic functions
remove-consumer: Public generic functions
remove-consumer: Public generic functions
remove-consumer: Public generic functions
remove-function-handler: Public ordinary functions
remove-handler: Public ordinary functions
remove-instruction: Public ordinary functions
remove-query: Public ordinary functions
respond: Public generic functions
respond: Public generic functions
respond: Public generic functions
respond: Public generic functions
running: Public standalone methods

S
slot-args->args: Private ordinary functions
slot-args->slots: Private ordinary functions
start: Public standalone methods
start: Public standalone methods
starts-with: Public ordinary functions
stop: Public standalone methods
stop: Public standalone methods
swank-connected-p: Private ordinary functions

T
target-class: Public generic functions
target-class: Public generic functions

U
universal-to-unix: Public ordinary functions
unix-to-universal: Public ordinary functions
unlist: Public ordinary functions
update-handler: Private ordinary functions
update-list: Public macros
update-root-for-image: Private ordinary functions

V
validate-superclass: Public standalone methods
validate-superclass: Public standalone methods
validate-superclass: Public standalone methods
validate-superclass: Public standalone methods

W
with-awaiting: Public macros
with-default-encoding: Public macros
with-retry-restart: Public macros

X
xnor: Public ordinary functions
xor: Public ordinary functions


A.3 Variables

Jump to:   *  
A   B   C   D   E   I   N   O   P   S   T  
Index Entry  Section

*
*debugger*: Public special variables
*root*: Public special variables
*unix-epoch-difference*: Private special variables

A
add-to-consumer: Public classes
agent: Public conditions

B
block-loop: Public classes

C
client: Public conditions
client: Public classes
consumer: Public classes
consumer: Public classes
consumers: Public classes
core: Public conditions
core-handlers: Public classes
cores: Public classes

D
data: Public classes
direct-advice: Private classes
direct-handlers: Public classes

E
effective-advice: Private classes
effective-handlers: Public classes
event-loop-lock: Public classes
existing-agent: Public conditions
existing-consumer: Public conditions

I
id: Public classes
instances: Public classes

N
name: Public classes
name: Public classes
new-consumer: Public conditions

O
options: Public classes

P
primary-loop: Public classes

S
Slot, add-to-consumer: Public classes
Slot, agent: Public conditions
Slot, block-loop: Public classes
Slot, client: Public conditions
Slot, client: Public classes
Slot, consumer: Public classes
Slot, consumer: Public classes
Slot, consumers: Public classes
Slot, core: Public conditions
Slot, core-handlers: Public classes
Slot, cores: Public classes
Slot, data: Public classes
Slot, direct-advice: Private classes
Slot, direct-handlers: Public classes
Slot, effective-advice: Private classes
Slot, effective-handlers: Public classes
Slot, event-loop-lock: Public classes
Slot, existing-agent: Public conditions
Slot, existing-consumer: Public conditions
Slot, id: Public classes
Slot, instances: Public classes
Slot, name: Public classes
Slot, name: Public classes
Slot, new-consumer: Public conditions
Slot, options: Public classes
Slot, primary-loop: Public classes
Slot, target-class: Public classes
Special Variable, *debugger*: Public special variables
Special Variable, *root*: Public special variables
Special Variable, *unix-epoch-difference*: Private special variables

T
target-class: Public classes


A.4 Data types

Jump to:   A   B   C   D   E   F   I   M   N   P   Q   R   S   T  
Index Entry  Section

A
abstract-handler: Public classes
active-event: Public classes
agent: Public classes
agent-already-exists-error: Public conditions
agent-condition: Public conditions
agent.lisp: The maiden/agent․lisp file

B
block-loop: Public classes

C
Class, abstract-handler: Public classes
Class, active-event: Public classes
Class, agent: Public classes
Class, block-loop: Public classes
Class, client: Public classes
Class, client-event: Public classes
Class, consumer: Public classes
Class, consumer-added: Public classes
Class, consumer-class: Public classes
Class, consumer-removed: Public classes
Class, core: Public classes
Class, core-event: Public classes
Class, data-entity: Public classes
Class, entity: Public classes
Class, event: Public classes
Class, event-class: Private classes
Class, instruction-event: Public classes
Class, named-entity: Public classes
Class, passive-event: Public classes
Class, primary-loop: Public classes
Class, query-event: Public classes
Class, response-event: Public classes
client: Public classes
client-condition: Public conditions
client-event: Public classes
client.lisp: The maiden/client․lisp file
Condition, agent-already-exists-error: Public conditions
Condition, agent-condition: Public conditions
Condition, client-condition: Public conditions
Condition, consumer-name-duplicated-warning: Public conditions
Condition, core-condition: Public conditions
Condition, maiden-condition: Public conditions
conditions.lisp: The maiden/conditions․lisp file
consumer: Public classes
consumer-added: Public classes
consumer-class: Public classes
consumer-name-duplicated-warning: Public conditions
consumer-removed: Public classes
consumer.lisp: The maiden/consumer․lisp file
core: Public classes
core-condition: Public conditions
core-event: Public classes
core.lisp: The maiden/core․lisp file

D
data-entity: Public classes
documentation.lisp: The maiden/documentation․lisp file

E
entity: Public classes
entity.lisp: The maiden/entity․lisp file
event: Public classes
event-class: Private classes
event.lisp: The maiden/event․lisp file

F
File, agent.lisp: The maiden/agent․lisp file
File, client.lisp: The maiden/client․lisp file
File, conditions.lisp: The maiden/conditions․lisp file
File, consumer.lisp: The maiden/consumer․lisp file
File, core.lisp: The maiden/core․lisp file
File, documentation.lisp: The maiden/documentation․lisp file
File, entity.lisp: The maiden/entity․lisp file
File, event.lisp: The maiden/event․lisp file
File, maiden.asd: The maiden/maiden․asd file
File, package.lisp: The maiden/package․lisp file
File, standard-events.lisp: The maiden/standard-events․lisp file
File, toolkit.lisp: The maiden/toolkit․lisp file

I
instruction-event: Public classes

M
maiden: The maiden system
maiden: The maiden package
maiden-condition: Public conditions
maiden-user: The maiden-user package
maiden.asd: The maiden/maiden․asd file

N
named-entity: Public classes

P
Package, maiden: The maiden package
Package, maiden-user: The maiden-user package
package.lisp: The maiden/package․lisp file
passive-event: Public classes
primary-loop: Public classes

Q
query-event: Public classes

R
response-event: Public classes

S
standard-events.lisp: The maiden/standard-events․lisp file
System, maiden: The maiden system

T
toolkit.lisp: The maiden/toolkit․lisp file