public abstract class ProviderFactory extends Object
ProviderFactory is a factory class used to create instances of
providers.
To enable tracing in an application, this class must be used to create
instances of the provider interfaces defined by users.
The system-defined factory is obtained by using the
getDefaultFactory() static method. The resulting instance can be
used to create any number of providers.| Modifier | Constructor and Description |
|---|---|
protected |
ProviderFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract <T extends Provider> |
createProvider(Class<T> cls)
Creates an implementation of a Provider interface.
|
static ProviderFactory |
getDefaultFactory()
Returns an implementation of a
ProviderFactory which
creates instances of Providers. |
public abstract <T extends Provider> T createProvider(Class<T> cls)
cls - the provider interface to be defined.cls, whose methods, when called,
will trigger tracepoints in the application.NullPointerException - if cls is nullIllegalArgumentException - if the class definition contains
non-void methodspublic static ProviderFactory getDefaultFactory()
ProviderFactory which
creates instances of Providers.
The created Provider instances will be linked to all appropriate
and enabled system-defined tracing mechanisms in the JDK.ProviderFactory that is used to create Providers.Copyright © 2012. All Rights Reserved.