Class. Server Action Handler Registry
sprotty-protocol / ServerActionHandlerRegistry
Defined in: action-handler.ts:28
Use this service to register handlers to specific actions. The DiagramServer
queries this registry
when an action is received from the client, and falls back to the built-in behavior if no handlers
are found.
new ServerActionHandlerRegistry():
ServerActionHandlerRegistry
ServerActionHandlerRegistry
protected
readonly
handlers:Map
<string
,ServerActionHandler
<Action
>[]>
Defined in: action-handler.ts:30
getHandler(
kind
):undefined
|ServerActionHandler
<Action
>[]
Defined in: action-handler.ts:35
Returns the action handlers for the given action kind, or undefined
if there are none.
string
undefined
| ServerActionHandler
<Action
>[]
onAction<
A
>(kind
,handler
):void
Defined in: action-handler.ts:42
Add an action handler to be called when an action of the specified kind is received.
A
extends Action
string
void
removeActionHandler<
A
>(kind
,handler
):void
Defined in: action-handler.ts:53
Remove an action handler that was previously added with onAction
.
A
extends Action
string
void