java.lang.Object
org.praxislive.base.AbstractRoot
org.praxislive.base.AbstractRootContainer
- All Implemented Interfaces:
Component,Container,Lookup.Provider,Root
-
Nested Class Summary
Nested classes/interfaces inherited from class org.praxislive.base.AbstractRoot
AbstractRoot.Controller, AbstractRoot.Delegate, AbstractRoot.DelegateConfiguration, AbstractRoot.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidchildren()Get a Stream of the child IDs that this container makes publicly visible.protected final voidprotected final voiddisconnect(String component1, String port1, String component2, String port2) getAddress(Component child) Get the address for the provided child component, or null if the component is not a child of this container.Get child component with specific ID.getControl(String id) Get a Control that can handle a Call to the given ID, or null if it does not exist.abstract ComponentInfogetInfo()Get the ComponentInfo object for this component.Get the Lookup from this Provider.Return the Container that is the immediate parent of this Component, or null if this Component is not currently contained within a Component hierarchy.Get the Port with the given ID, or null if it does not exist.voidNotify the component that a change has happened in its component hierarchy.voidparentNotify(Container parent) Notify the Component that it has been added to the supplied Container, or removed from its parent if the supplied argument is null.protected voidprocessCall(Call call, PacketRouter router) Method called to handle every receivedCall.protected final voidregisterControl(String id, Control control) protected final ComponentremoveChild(String id) protected final voidvoidwrite(TreeWriter writer) If supported, write the state of this container to the providedTreeWriter.Methods inherited from class org.praxislive.base.AbstractRoot
activating, attachDelegate, createContext, createController, createRouter, delegateConfig, detachDelegate, findService, getAddress, getExecutionContext, getRootHub, getRouter, getState, initialize, interrupt, invokeLater, setIdle, setRunning, starting, stopping, terminating, update
-
Constructor Details
-
AbstractRootContainer
protected AbstractRootContainer()
-
-
Method Details
-
getChild
Description copied from interface:ContainerGet child component with specific ID. -
children
Description copied from interface:ContainerGet a Stream of the child IDs that this container makes publicly visible. Containers may have hidden children that can be returned fromContainer.getChild(java.lang.String)but are not listed here. All IDs returned should correspond to valid components, and (if provided) match the implementation ofContainerProtocol.A Stream is returned allowing flexibility in implementation.
-
getAddress
Description copied from interface:ContainerGet the address for the provided child component, or null if the component is not a child of this container.- Specified by:
getAddressin interfaceContainer- Parameters:
child- component- Returns:
- address, or null of component is not a child of this container.
-
getParent
Description copied from interface:ComponentReturn the Container that is the immediate parent of this Component, or null if this Component is not currently contained within a Component hierarchy. -
parentNotify
Description copied from interface:ComponentNotify the Component that it has been added to the supplied Container, or removed from its parent if the supplied argument is null. The Component may throw a VetoException if it should not be added to the Container provided. It should also throw this exception if a parent is already set.- Specified by:
parentNotifyin interfaceComponent- Parameters:
parent-- Throws:
VetoException
-
hierarchyChanged
public void hierarchyChanged()Description copied from interface:ComponentNotify the component that a change has happened in its component hierarchy. For example its direct parent or an ancestor has changed. This method will be called after parentNotify() if the result of an immediate parent change.- Specified by:
hierarchyChangedin interfaceComponent
-
getControl
Description copied from interface:ComponentGet a Control that can handle a Call to the given ID, or null if it does not exist. Component implementations are free to return a different Control for each ID, a single control to handle any message, or somewhere in between. A null return from this method shall be handled by the Root component by responding with an error message to the sender where required.- Specified by:
getControlin interfaceComponent- Parameters:
id-- Returns:
- Control or null
-
getPort
Description copied from interface:ComponentGet the Port with the given ID, or null if it does not exist. -
getLookup
Description copied from interface:Lookup.ProviderGet the Lookup from this Provider.- Specified by:
getLookupin interfaceLookup.Provider- Overrides:
getLookupin classAbstractRoot- Returns:
- lookup
-
getInfo
Description copied from interface:ComponentGet the ComponentInfo object for this component. -
write
Description copied from interface:ContainerIf supported, write the state of this container to the providedTreeWriter. This should allow for the container, and its children, to be recreated in as close to its current state as possible.To fully support this method, the Container should write its type, component info, property values, children and connections, in that order. It may also add custom annotations.
The default implementation of this method does nothing.
-
processCall
Description copied from class:AbstractRootMethod called to handle every receivedCall. The provided router should be used for all ongoing or return calls.- Specified by:
processCallin classAbstractRoot- Parameters:
call-router-
-
addChild
- Throws:
VetoException
-
removeChild
-
connect
protected final void connect(String component1, String port1, String component2, String port2) throws PortConnectionException - Throws:
PortConnectionException
-
disconnect
-
registerControl
-
unregisterControl
-