AbstractServerAction:
Filter:
Classes | Control

AbstractServerAction : AbstractSystemAction : Object

register actions to be taken for a server

Description

This is an abstract superclass for singletons like ServerQuit, which provides a place for registering functions and objects for events that should happen when something happens in the server. No direct call to AbstractServerAction is required.

NOTE: not fully working on Linux and windows. Setting the computer to sleep on these systems causes the actions to be called. As to date in Linux, JACK does not survive a sleep, it nevertheless behaves correctly for the time being.

Class Methods

AbstractServerAction.functionSelector

Subclasses return specific function selectors for objects that implement this as interface. Selectors are:

not for registry with a server, but analogous are:

AbstractServerAction.add(object, server)

Add an action or object for registry.

Arguments:

object

Can either be a Function to be evaluated (as first arg the server is passed in), or an Object that implements the message returned by -functionSelector. One object is only registered once, so that multiple additions don't cause multiple calls.

server

Server for which to register. If the symbol \default is passed in, the action is called for the current default server. If the symbol \all is passed in, the action is called for all current servers. If server is nil, it is added to \all.

AbstractServerAction.remove(object, server)

Remove an item or object from registry. If server is nil, remove from all key.

AbstractServerAction.removeServer(server)

Remove all items that are registered for a given server.

Inherited class methods

Undocumented class methods

AbstractServerAction.addToAll(object)

AbstractServerAction.performFunction(server, function)

AbstractServerAction.run(server)

Instance Methods

Inherited instance methods

Examples