C
- anything that can be considered a Command@JsType(isNative=true)
public interface KogitoJSCommandRegistry<C>
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the registry
|
C[] |
getCommands()
Returns an array containing all the commands in the registry
|
boolean |
isEmpty()
Determines if the registry is empty or not
|
C |
peek()
Peeks the last added command.
|
C |
pop()
Pops the last added command and removes it.
|
void |
register(String id,
C command)
Registers a command with a give ID into the registry
|
void |
setMaxSize(int size)
Sets the max number of commands that can be stored on the registry.
|
void |
setRegistryChangeListener(StateControlCommand changeListener)
Sets a
StateControlCommand to be called when the registry changes. |
void register(String id, C command)
id
- The command idcommand
- A command to registerC peek()
C pop()
void setMaxSize(int size)
size
- A positive integervoid clear()
boolean isEmpty()
C[] getCommands()
void setRegistryChangeListener(StateControlCommand changeListener)
StateControlCommand
to be called when the registry changes.changeListener
- A StateControlCommand
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.