|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.dpml.lang.Strategy
net.dpml.runtime.ComponentStrategy
public class ComponentStrategy
Component strategy.
| Method Summary | ||
|---|---|---|
void |
addComponentListener(ComponentListener listener)
Add a listener to the component. |
|
void |
encode(Buffer buffer,
String key)
Write the strategy to the supplied buffer in XML format. |
|
ActivationPolicy |
getActivationPolicy()
Return the assigned activation policy. |
|
CollectionPolicy |
getCollectionPolicy()
Return the assigned collection policy. |
|
|
getContentForClass(Class<T> c)
Return a value assignable to the supplied type or null if the type cannot be resolved from this strategy. |
|
|
getInstance(Class<T> clazz)
Instantiate a service returning an instance assigned to the supplied type. |
|
LifestylePolicy |
getLifestylePolicy()
Return the assigned lifestyle policy. |
|
String |
getName()
Return the short name of this strategy. |
|
int |
getPriority()
Return the priority assigned to this strategy. |
|
Provider |
getProvider()
Return a decommissioning provider. |
|
void |
initialize(ServiceRegistry registry)
Composite strategies are strategy implementations that contain subidary strategies. |
|
boolean |
isaCandidate(Class<?> type)
Return true if this strategy is a candidate with result to the supply of an instance assignable to the supplied type. |
|
|
lookup(Class<T> service)
|
|
void |
release(Provider provider)
Release a provider. |
|
void |
removeComponentListener(ComponentListener listener)
Remove a listener from the component. |
|
void |
terminate()
Terminate the component. |
|
String |
toString()
Returns the string representing of the component. |
|
| Methods inherited from class net.dpml.lang.Strategy |
|---|
compareTo, getClassLoader, load, load, load |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public String getName()
Strategy
getName in interface ComponentgetName in class Strategypublic int getPriority()
Strategy
getPriority in class Strategypublic void addComponentListener(ComponentListener listener)
addComponentListener in interface Componentlistener - the component listenerpublic void removeComponentListener(ComponentListener listener)
removeComponentListener in interface Componentlistener - the component listenerpublic Provider getProvider()
Component
getProvider in interface Componentpublic void release(Provider provider)
Component
release in interface Componentprovider - the provider to releasepublic void initialize(ServiceRegistry registry)
Strategy
initialize in class Strategyregistry - the service registrypublic boolean isaCandidate(Class<?> type)
Strategy
isaCandidate in class Strategytype - the requested type
public <T> T lookup(Class<T> service)
lookup in interface ServiceRegistrypublic void terminate()
Component
terminate in interface Componentpublic CollectionPolicy getCollectionPolicy()
public LifestylePolicy getLifestylePolicy()
public ActivationPolicy getActivationPolicy()
public <T> T getInstance(Class<T> clazz)
Strategy
getInstance in class Strategyclazz - the return type
public <T> T getContentForClass(Class<T> c)
throws IOException
Strategy
getContentForClass in class Strategyc - the target class
IOException - if an IO error occurs
public void encode(Buffer buffer,
String key)
throws IOException
Strategy
encode in class Strategybuffer - the output bufferkey - the optional identifying key
IOException - if an IO error occurspublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||