|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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 Component
getName
in class Strategy
public int getPriority()
getPriority
in class Strategy
public void addComponentListener(ComponentListener listener)
addComponentListener
in interface Component
listener
- the component listenerpublic void removeComponentListener(ComponentListener listener)
removeComponentListener
in interface Component
listener
- the component listenerpublic Provider getProvider()
getProvider
in interface Component
public void release(Provider provider)
release
in interface Component
provider
- the provider to releasepublic void initialize(ServiceRegistry registry)
initialize
in class Strategy
registry
- the service registrypublic boolean isaCandidate(Class<?> type)
isaCandidate
in class Strategy
type
- the service type
public <T> T lookup(Class<T> service)
lookup
in interface ServiceRegistry
service
- the service type
public void terminate()
terminate
in interface Component
public CollectionPolicy getCollectionPolicy()
public LifestylePolicy getLifestylePolicy()
public ActivationPolicy getActivationPolicy()
public <T> T getInstance(Class<T> clazz)
getInstance
in class Strategy
clazz
- the class
public <T> T getContentForClass(Class<T> c) throws IOException
getContentForClass
in class Strategy
c
- the class
IOException
- if an error occurspublic void encode(Buffer buffer, String key) throws IOException
encode
in class Strategy
buffer
- 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 |