- java.lang.Object
-
- org.praxislive.code.SharedCodeProperty
-
- All Implemented Interfaces:
Control
public class SharedCodeProperty extends Object implements Control
A property control for shared code classes. A SharedCodeProperty can be added to a container (eg. Root). TheSharedCodeContext
should be added to the container's lookup where it can be found and used by contained code components.
-
-
Field Summary
Fields Modifier and Type Field Description static ControlInfo
INFO
-
Constructor Summary
Constructors Constructor Description SharedCodeProperty(Lookup.Provider lookupContext, Consumer<LogBuilder> logHandler)
Create a shared code property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
call(Call call, PacketRouter router)
SharedCodeContext
getSharedCodeContext()
The shared code context, which should be added to the container's lookup.
-
-
-
Field Detail
-
INFO
public static final ControlInfo INFO
-
-
Constructor Detail
-
SharedCodeProperty
public SharedCodeProperty(Lookup.Provider lookupContext, Consumer<LogBuilder> logHandler)
Create a shared code property.- Parameters:
lookupContext
- lookup provider, eg. the containerlogHandler
- a consumer for logs
-
-
Method Detail
-
call
public void call(Call call, PacketRouter router) throws Exception
-
getSharedCodeContext
public SharedCodeContext getSharedCodeContext()
The shared code context, which should be added to the container's lookup.- Returns:
- shared code context
-
-