|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ToolkitFactoryService
Service for creating Toolkit
instances. This interface is implemented by toolkit implementations that want to
handle specific 'toolkitUrl's and provide their own toolkit implementation.
At runtime, the ToolkitFactory
finds all implementations of this interface and chooses the first one that can
handle the given toolkitUrl. Implementations should return true for
canHandleToolkitType(String, String)
given the toolkit type and subName it can handle.
Implementors can deploy their implementation by deploying a jar containing the implementation in the classpath. The
jar should also contain a file "META-INF/services/org.terracotta.toolkit.api.ToolkitFactoryService" that contains the
fully-qualified classname of this service implementation in a single line.
Method Summary | |
---|---|
boolean |
canHandleToolkitType(String type,
String subName)
Returns true if this implementation can handle toolkit types specified by 'type' and 'subName'. |
Toolkit |
createToolkit(String type,
String subName,
Properties properties)
Creates a Toolkit instance for the given type, subName and using the properties passed in. |
Method Detail |
---|
boolean canHandleToolkitType(String type, String subName)
type
- the type of the toolkitsubName
- subName for the toolkit
ToolkitFactory.createToolkit(String)
,
ToolkitFactory.createToolkit(String, Properties)
Toolkit createToolkit(String type, String subName, Properties properties) throws ToolkitInstantiationException
ToolkitInstantiationException
if it cannot handle the toolkit type or if it cannot create the toolkit
due to wrong/invalid configuration.
type
- the type of the toolkitsubName
- subName for the toolkitproperties
- contains user configured properties. Can be null.
ToolkitInstantiationException
- if the type cannot be handled or if there is any errorToolkitFactory.createToolkit(String)
,
ToolkitFactory.createToolkit(String, Properties)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |