|
||||||||||
| 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)
Encode the component model to the supplied buffer. |
|
ActivationPolicy |
getActivationPolicy()
Return the assigned activation policy. |
|
CollectionPolicy |
getCollectionPolicy()
Return the assigned collection policy. |
|
|
getContentForClass(Class<T> c)
Return an instance of the requested class. |
|
|
getInstance(Class<T> clazz)
Return an instance of the requested class. |
|
LifestylePolicy |
getLifestylePolicy()
Return the assigned lifestyle policy. |
|
String |
getName()
Get the component name. |
|
int |
getPriority()
Get the component priority. |
|
Provider |
getProvider()
Get a runtime provider for this component. |
|
void |
initialize(ServiceRegistry registry)
Initialize the component with a supplied service registry. |
|
boolean |
isaCandidate(Class<?> type)
Test if this component model can handle the supplied service type. |
|
|
lookup(Class<T> service)
Get a service reference for the supplied type. |
|
void |
release(Provider provider)
Release a provider back to the component. |
|
void |
removeComponentListener(ComponentListener listener)
Remove a listener from the component. |
|
void |
terminate()
Terminate the component model. |
|
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()
getName in interface ComponentgetName in class Strategypublic int getPriority()
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()
getProvider in interface Componentpublic void release(Provider provider)
release in interface Componentprovider - the provider to releasepublic void initialize(ServiceRegistry registry)
initialize in class Strategyregistry - the service registrypublic boolean isaCandidate(Class<?> type)
isaCandidate in class Strategytype - the service type
public <T> T lookup(Class<T> service)
lookup in interface ServiceRegistryservice - the service type
public void terminate()
terminate in interface Componentpublic CollectionPolicy getCollectionPolicy()
public LifestylePolicy getLifestylePolicy()
public ActivationPolicy getActivationPolicy()
public <T> T getInstance(Class<T> clazz)
getInstance in class Strategyclazz - the class
public <T> T getContentForClass(Class<T> c)
throws IOException
getContentForClass in class Strategyc - the class
IOException - if an error occurs
public void encode(Buffer buffer,
String key)
throws IOException
encode in class Strategybuffer - the endoding bufferkey - the component key
IOException - if an error occurspublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||