| org.cougaar.core.component.BinderFactory
All known Subclasses: org.cougaar.core.component.BinderFactorySupport,
BinderFactory | public interface BinderFactory extends Component(Code) | | A BinderFactory provides Binder instances
on behalf of a ContainingComponent or ServiceProvider to wrap
Child components.
BinderFactories are generally themselves specially bound by only by
a trivial binder, so the "parent" component link is supplied shortly after
construction by a call to the setContainer method. This may change
to something closer to the way that any other component is bound at
some point.
|
Inner Class :final class BFComparator implements Comparator | |
MAX_PRIORITY | int MAX_PRIORITY(Code) | | Highest priority, for use by very important specific
BinderFactoryWrappers.
|
MIN_PRIORITY | int MIN_PRIORITY(Code) | | Lowest-priority for a BinderFactory. Default infrastructure
BinderFactories are generally at this level.
|
NORM_PRIORITY | int NORM_PRIORITY(Code) | | Typical intermediate priority for "real-world" BinderFactories.
Higher priorities should be used mainly for BinderFactoryWrappers.
|
comparator | Comparator comparator(Code) | | a comparator for keeping Binder Factories sorted *
|
getBinder | Binder getBinder(Object child)(Code) | | Get or Construct a binder for a child component.
The returned value will be a Binder
customized for use by the child Component. The
Factory may impose any restrictions deemed neccessary on
the client object. Most commonly, the child will often
be required to implement a client-side interface of a
service protocol.
|
getComponentFactory | ComponentFactory getComponentFactory()(Code) | | Get the BinderFactory's ComponentFactory.
May return null if the BinderFactory doesn't make components.
|
getPriority | int getPriority()(Code) | | The priority of this binder factory. The range of values
is specified by the MIN_PRIORITY to MAX_PRIORITY.
This value determines stacking order, with MAX_PRIORITY factories
getting first chance to construct binders. Generally,
the first one to respond wins.
This is pretty half-baked, but we need some policy to resolve
ambiguity. Perhaps a two-level approach would be sufficient,
e.g. built-in versus dynamically loaded factory. Also an
option is to logically try all available binder factories and
then resolve any conflicts which might arise.
|
|
|