org.webmacro
Interface Provider

All Known Implementing Classes:
DirectiveProvider, ParserProvider, CachingProvider, ConfigProvider, EncoderProvider

public interface Provider

A Provider is an object responsible or loading and managing instances of a given type. The Provider is used by the Broker to look up objects on demand.

By implementing new Provider types and registering them with the broker via WebMacro.properties you can extend or change WebMacro's behavior.


Method Summary
 void destroy()
          Close down this provider, freeing any allocated resources.
 void flush()
          Clear any cache this provider may be maintaining
 java.lang.Object get(java.lang.String query)
          Get the object associated with the specified query
 java.lang.String getType()
          Return an array representing the types this provider serves up
 void init(Broker b, Settings config)
          Initialize this provider based on the specified config.
 

Method Detail

getType

public java.lang.String getType()
Return an array representing the types this provider serves up

init

public void init(Broker b,
                 Settings config)
          throws InitException
Initialize this provider based on the specified config.

flush

public void flush()
Clear any cache this provider may be maintaining

destroy

public void destroy()
Close down this provider, freeing any allocated resources.

get

public java.lang.Object get(java.lang.String query)
                     throws ResourceException
Get the object associated with the specified query