java.lang.Object
org.praxislive.core.protocols.StartableProtocol
- All Implemented Interfaces:
Protocol
Protocol for a component that can be started and stopped.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.praxislive.core.Protocol
Protocol.Type<T extends Protocol>, Protocol.TypeProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ComponentInfoA component info for this protocol.static final StringName of the is-running control.static final ControlInfoInfo for the is-running control.static final StringName of the start control.static final ControlInfoInfo for the start control.static final StringName of the stop control.static final ControlInfoInfo for the stop control. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontrols()The names of the controls that a component advertising this protocol must provide.getControlInfo(String control) Query the ControlInfo for the provided control name on this protocol.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.praxislive.core.Protocol
optionalControls
-
Field Details
-
START
Name of the start control.- See Also:
-
STOP
Name of the stop control.- See Also:
-
IS_RUNNING
Name of the is-running control.- See Also:
-
START_INFO
Info for the start control. It is an action control that should "start" the component. It may respond with an error if for some reason the component cannot be started. -
STOP_INFO
Info for the stop control. It is an action control that should "stop" the component. It may respond with an error if for some reason the component cannot be stopped. -
IS_RUNNING_INFO
Info for the is-running control. It is a read-only boolean property that responds whether the component is currently running / started. -
API_INFO
A component info for this protocol. Can be used withInfo.ComponentInfoBuilder.merge(org.praxislive.core.ComponentInfo).
-
-
Constructor Details
-
StartableProtocol
public StartableProtocol()
-
-
Method Details
-
controls
Description copied from interface:ProtocolThe names of the controls that a component advertising this protocol must provide. -
getControlInfo
Description copied from interface:ProtocolQuery the ControlInfo for the provided control name on this protocol. The component implementing this protocol will generally use the control info provided here inside its component info. In exceptional circumstances, the component may extend or adapt the behaviour of the control, as long as it is fully compatible with this control info and the specification.- Specified by:
getControlInfoin interfaceProtocol- Parameters:
control- name of control- Returns:
- control info for named control
-