-
- All Known Subinterfaces:
Service
- All Known Implementing Classes:
CodeCompilerService
,CodeComponentFactoryService
,CodeContextFactoryService
,CodeRootFactoryService
,ComponentFactoryService
,ComponentProtocol
,ContainerProtocol
,LogService
,RootFactoryService
,RootManagerService
,ScriptService
,SharedCodeService
,StartableProtocol
,SystemManagerService
,TaskService
public interface Protocol
A Protocol defines known controls and behaviours that a component can provide.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Protocol.Type<T extends Protocol>
A protocol type registration, allowing protocols to be discovered by class or name.static interface
Protocol.TypeProvider
Provide additionalProtocol.Type
.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Stream<String>
controls()
The names of the controls that a component advertising this protocol must provide.ControlInfo
getControlInfo(String control)
Query the ControlInfo for the provided control name on this protocol.default Stream<String>
optionalControls()
The names of additional controls that a component advertising this protocol might provide.
-
-
-
Method Detail
-
controls
Stream<String> controls()
The names of the controls that a component advertising this protocol must provide.- Returns:
- stream of control names
-
optionalControls
default Stream<String> optionalControls()
The names of additional controls that a component advertising this protocol might provide. These controls are optional. Any caller should check whether the component info contains the control, or otherwise prepare for the control not to be available.Implementation note : the protocol implementation should support querying the control info via
getControlInfo(java.lang.String)
. The default implementation returns an empty stream.- Returns:
- stream of optional control names
-
getControlInfo
ControlInfo getControlInfo(String control)
Query 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.- Parameters:
control
- name of control- Returns:
- control info for named control
-
-