java.lang.Object
org.praxislive.core.protocols.SerializableProtocol
- All Implemented Interfaces:
Protocol
Protocol to serialize all or part of a component tree. The protocol will
usually be implemented by a root container.
The standard format is a hierarchical map. Annotation keys, including type,
info and connections, are prefixed by %. Child keys are prefixed
by @ and the values are maps. Property keys are not prefixed.
%type core:container
%info ...
%custom-annotation foo
property1 true
@child1 {
%type core:custom
%info ...
property1 42
}
@child2 {
%type core:custom
%info ...
}
%connections { {child1 in child2 out} {child2 ready child1 trigger} }
-
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 StringMap key for the optional subtree configuration parameter.static final StringName of the serialize control.static final ControlInfoControl info for the serialize 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
-
SERIALIZE
Name of the serialize control.- See Also:
-
OPTION_SUBTREE
Map key for the optional subtree configuration parameter. The value must be aComponentAddressthat is a sub-component of the component implementing this protocol. The returned data will be as if the subtree component is at the root.- See Also:
-
SERIALIZE_INFO
Control info for the serialize control. The control accepts an optional configuration map.Callers may use the configuration key
OPTION_SUBTREEto filter the returned data.Implementations of this protocol should return an error if they do not recognise any provided configuration key or value.
-
API_INFO
A component info for this protocol. Can be used withInfo.ComponentInfoBuilder.merge(org.praxislive.core.ComponentInfo).
-
-
Constructor Details
-
SerializableProtocol
public SerializableProtocol()
-
-
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
-