|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.portal.provider.v2.ProviderLoader
public abstract class ProviderLoader
In its simplest terms, a ProviderLoader
can be thought of as a
'factory' for ProviderInstance
objects: the objects that actually
carry out the functionality of a single registered provider
instance. However, given that a ProviderInstance
is generally driven
from meta-data in a ProviderDefinition
, which should be shared by
other ProviderInstance
s of the same 'type', it is also the
responsibility of a ProviderLoader
to initialize and cache an
up-to-date version of the ProviderDefinition
and associate this
with the instances it creates.
Generally, a ProviderLoader
will initialize a
ProviderDefinition
from meta data held in a persistent store,
e.g. XML file or database. To allow changes to the persisted data to be
picked up while the provider is in operation, a ProviderLoader
is allowed to replace its cached ProviderDefinition
with a new
version under certain circumstances. A flag is provided to suppress this
behaviour, however, so that the ProviderInstance and the Portal it is
registered on do not get 'out of sync' with respect to their picture of the
provider.
Because this mechanism is kept external to the
ProviderDefinition
itself, it gives scope for the same provider
to be backed by a different storage medium without having to change its
implementation.
Constructor Summary | |
---|---|
ProviderLoader()
|
Method Summary | |
---|---|
abstract ProviderContext |
getProviderContext()
Gets the context object that describes the deployment environment of the provider type handled by this ProviderLoader . |
ProviderInstance |
getProviderInstance(java.lang.String providerId)
Gets a ProviderInstance object with the specified
providerId without permitting reload of the cached
ProviderDefinition . |
abstract ProviderInstance |
getProviderInstance(java.lang.String providerId,
boolean refresh)
Gets a ProviderInstance object with the specified
providerId, optionally permitting reload of the cached
ProviderDefinition . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProviderLoader()
Method Detail |
---|
public ProviderInstance getProviderInstance(java.lang.String providerId) throws ProviderException
ProviderInstance
object with the specified
providerId without permitting reload of the cached
ProviderDefinition
.
This is provided as a shorthand for calling getProviderInstance(providerId,
false)
.
providerId
- the providerId of the ProviderInstance
that is being requested
ProviderInstance
object with the specified
providerId
ProviderException
public abstract ProviderInstance getProviderInstance(java.lang.String providerId, boolean refresh) throws ProviderException
ProviderInstance
object with the specified
providerId, optionally permitting reload of the cached
ProviderDefinition
.
The first time this method is called, a new
ProviderDefinition
should be loaded from its meta data and
cached internally. This same cached ProviderDefinition
must
be associated with all ProviderInstance
s returned by this
method, unless it is called again when the refresh
flag is
true
. In this case, the method is allowed to replace the
cached ProviderDefinition
with a new version, e.g. if its
meta data has been changed.
providerId
- the providerId of the ProviderInstance
that is being requestedrefresh
- flag indicating whether the
ProviderDefinition
should be reloaded or not. A value of
true
will cause a refresh.
ProviderInstance
object with the specified providerId
ProviderException
public abstract ProviderContext getProviderContext()
ProviderLoader
.
|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |