Interface Protocol

All Known Subinterfaces:
Service
All Known Implementing Classes:
CodeChildFactoryService, CodeCompilerService, CodeComponentFactoryService, CodeContextFactoryService, CodeRootFactoryService, ComponentFactoryService, ComponentProtocol, ContainerProtocol, LogService, RootFactoryService, RootManagerService, ScriptService, SerializableProtocol, 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 
    A protocol type registration, allowing protocols to be discovered by class or name.
    static interface 
    Provide additional Protocol.Type.
  • Method Summary

    Modifier and Type
    Method
    Description
    The names of the controls that a component advertising this protocol must provide.
    Query the ControlInfo for the provided control name on this protocol.
    default Stream<String>
    The names of additional controls that a component advertising this protocol might provide.
  • Method Details

    • 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