public interface PluginContext extends GlobalContext, ObjectConstructor
Modifier and Type | Method and Description |
---|---|
<T extends Connection> |
addConnection(T c)
Registers the given connection in the global context.
|
void |
clear() |
PluginContext |
createChildContext(java.lang.String label)
Returns a new plugin context instance, which can be used to invoke other
plugins.
|
boolean |
deleteChild(PluginContext child)
Delete this child from this context.
|
java.util.List<PluginContext> |
getChildContexts()
Returns a list of all child contexts which have been created with
createChildContext().
|
java.util.concurrent.Executor |
getExecutor()
Returns an executor which can be used to execute plugins in child
contexts.
|
ProMFuture<?> |
getFutureResult(int i)
This method should only be used by a plugin, in the body of that plugin.
|
PluginContextID |
getID()
Each PluginContext should carry an ID.
|
java.lang.String |
getLabel()
Returns the label of this context.
|
Logger.ListenerList |
getLoggingListeners()
Returns the list of logging listeners registered to this context.
|
PluginContext |
getParentContext()
Returns the context which created this context or null if it has no
parent.
|
Pair<PluginDescriptor,java.lang.Integer> |
getPluginDescriptor()
Return the plugin descriptor and method index of the plugin which is
invoked in this context.
|
PluginLifeCycleEventListener.List |
getPluginLifeCycleEventListeners()
Returns the list of registered plugin life cycle listeners.
|
Progress |
getProgress()
Returns the progress object corresponding to this context
|
ProgressEventListener.ListenerList |
getProgressEventListeners()
Returns the list of registered progress listeners
|
PluginExecutionResult |
getResult()
This method returns the PluginExecutionResult of the plugin which is
invoked in this context.
|
PluginContext |
getRootContext()
Returns the root plugin context.
|
boolean |
hasPluginDescriptorInPath(PluginDescriptor descriptor,
int methodIndex) |
boolean |
isDistantChildOf(PluginContext context)
Returns true if this is a distant child of context, i.e.
|
void |
log(java.lang.String message)
Same as calling log(message, MessageLevel.NORMAL);
|
void |
log(java.lang.String message,
Logger.MessageLevel level)
The provided String is provided to the context for information.
|
void |
log(java.lang.Throwable exception)
The provided Exception is provided to the context.
|
void |
setFuture(PluginExecutionResult resultToBe) |
void |
setPluginDescriptor(PluginDescriptor descriptor,
int methodIndex) |
createNewPluginContextID, getConnectionManager, getPluginContextType, getPluginManager, getProvidedObjectManager, invokeBinding, invokePlugin
tryToFindOrConstructAllObjects, tryToFindOrConstructFirstNamedObject, tryToFindOrConstructFirstObject
PluginContext createChildContext(java.lang.String label)
Progress getProgress()
ProgressEventListener.ListenerList getProgressEventListeners()
PluginLifeCycleEventListener.List getPluginLifeCycleEventListeners()
PluginContextID getID()
java.lang.String getLabel()
Pair<PluginDescriptor,java.lang.Integer> getPluginDescriptor()
PluginContext getParentContext()
java.util.List<PluginContext> getChildContexts()
PluginExecutionResult getResult()
FieldNotSetException
- If the future is not know to this contextProMFuture<?> getFutureResult(int i)
i
- java.util.concurrent.Executor getExecutor()
boolean isDistantChildOf(PluginContext context)
context
- void setFuture(PluginExecutionResult resultToBe)
void setPluginDescriptor(PluginDescriptor descriptor, int methodIndex) throws FieldSetException, RecursiveCallException
boolean hasPluginDescriptorInPath(PluginDescriptor descriptor, int methodIndex)
void log(java.lang.String message, Logger.MessageLevel level)
message
- the message to loglevel
- the message levelvoid log(java.lang.String message)
message
- The messagevoid log(java.lang.Throwable exception)
exception
- the exception thrownLogger.ListenerList getLoggingListeners()
PluginContext getRootContext()
boolean deleteChild(PluginContext child)
child
- <T extends Connection> T addConnection(T c)
c
- void clear()