org.webmacro.util
Class EncoderProvider
java.lang.Object
|
+--org.webmacro.util.EncoderProvider
- All Implemented Interfaces:
- Provider
- public class EncoderProvider
- extends java.lang.Object
- implements Provider
A provider which dispenses Encoders, which are used for encoding
Strings and caching the results.
- Since:
- 0.96
- Author:
- Michael Bayne
Field Summary |
static java.lang.String |
TYPE
The provider type for this provider. |
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 encoding)
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE
public static final java.lang.String TYPE
- The provider type for this provider. Use this when calling
Broker.getProvider()
.
EncoderProvider
public EncoderProvider()
getType
public java.lang.String getType()
- Return an array representing the types this provider serves up
- Specified by:
getType
in interface Provider
init
public void init(Broker b,
Settings config)
throws InitException
- Initialize this provider based on the specified config. Derived
encoder provider implementations may override this method to obtain
initialization parameters of their own devising, but they must be
sure to call super.init() in their overridden methods.
- Specified by:
init
in interface Provider
flush
public void flush()
- Clear any cache this provider may be maintaining.
- Specified by:
flush
in interface Provider
destroy
public void destroy()
- Close down this provider, freeing any allocated resources.
- Specified by:
destroy
in interface Provider
get
public java.lang.Object get(java.lang.String encoding)
throws ResourceException
- Get the object associated with the specified query.
- Specified by:
get
in interface Provider