public interface IRequestor
When an injector is asked to do a task, it splits work into a set of requestors. Requestors are passed to relevant object suppliers so that requestors can be executed when values in the supplier change. (For instance, an object supplier that provided the value for the injected field, is expected to execute requestor again when it detects change in the injected value).
Modifier and Type | Method and Description |
---|---|
void |
disposed(PrimaryObjectSupplier objectSupplier)
Notifies the requestor that an object supplier has been disposed of.
|
Object |
execute()
Call this method to perform requestor's task.
|
Object |
getRequestingObject()
The injected object that initiated this request
|
Class<?> |
getRequestingObjectClass()
Class of the injected object
|
boolean |
isValid()
Determines if this requestor is still valid.
|
void |
resolveArguments(boolean initial)
Forces the requestor to resolve arguments it depends on.
|
boolean |
uninject(Object object,
PrimaryObjectSupplier objectSupplier)
Notifies the requestor that an object should be un-injected.
|
void resolveArguments(boolean initial) throws InjectionException
initial
- true
if this is the initial attempt to resolve argumentsInjectionException
- if an exception occurred while performing this taskObject execute() throws InjectionException
InjectionException
- if an exception occurred while performing this taskObject getRequestingObject()
null
Class<?> getRequestingObjectClass()
null
boolean isValid()
true
if this requestor is valid, false
otherwisevoid disposed(PrimaryObjectSupplier objectSupplier) throws InjectionException
objectSupplier
- the object supplier being disposed ofInjectionException
- if an exception occurred while performing this taskboolean uninject(Object object, PrimaryObjectSupplier objectSupplier) throws InjectionException
object
- domain object that needs to be un-injectedobjectSupplier
- the object supplier being un-injectedtrue
if the object was uninjected, false
otherwiseInjectionException
- if an exception occurred while performing this task
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.