|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.hyades.logging.events.cbe.impl.AbstractEventFactoryHome
An abstract event factory home implementation for working with event factories.
This abstract class provides EventFactory
resolution, persistence of
retrieved EventFactory
instances, possible configuration updates based
on a specific type of configuration template for the EventFactory
instance and releasing EventFactory
instances.
Concrete implementations of this abstract class implement the
createContentHandler(String factoryName)
and
resolveContentHandler()
APIs to typically provide a ContentHandler
implementation tightly coupled to the type of the concrete implementation of
this abstract class. Concrete implementations that do not require a
ContentHandler
nor configuration template, simply return null
for each API.
For example, a concrete implementation of this abstract class may provide the
an implementation of the createContentHandler(String factoryName)
API that creates a specialized ContentHandler
pre-configured with
an event template resolved from a local event property file. The concrete
implementation of this abstract class would also provide an implementation
of the resolveContentHandler()
API that retrieves a new instance
of the specialized ContentHandler
used in the implementation of
the createContentHandler(String factoryName)
API.
It is assumed that implementations of the createContentHandler(String factoryName)
API would reference the implementation of the resolveContentHandler()
API in the
same concrete implementation of this abstract class when creating the returned ContentHandler
.
EventFactoryHome
,
EventPermission
Constructor Summary | |
---|---|
AbstractEventFactoryHome()
|
Method Summary | |
---|---|
void |
checkAccess()
Checks the system's SecurityManager for the context of the currently
executing thread to see if the caller has permission to create, retrieve, update
and release Event Factory instances from the Event Factory Home. |
abstract ContentHandler |
createContentHandler(java.lang.String factoryName)
Creates an instance of the ContentHandler implementation which
is tightly coupled to the type of the concrete implementation of
this abstract class. |
EventFactory |
getEventFactory(java.lang.String factoryName)
Retrieves an instance of the named EventFactory . |
void |
releaseEventFactory(java.lang.String factoryName)
Releases the reference to the instance of the named EventFactory . |
abstract ContentHandler |
resolveContentHandler()
Resolves an instance of the ContentHandler implementation which
is tightly coupled to the type of the concrete implementation of
this abstract class. |
void |
updateEventFactory(java.lang.String factoryName)
Updates the configuration on the instance of the named EventFactory . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractEventFactoryHome()
Method Detail |
public abstract ContentHandler createContentHandler(java.lang.String factoryName)
ContentHandler
implementation which
is tightly coupled to the type of the concrete implementation of
this abstract class.
The returned instance of the ContentHandler
implementation is
pre-configured with a event properties resolved from a source tightly coupled
to the type of the concrete implementation of this abstract class.
It is assumed that implementations of this method would reference the implementation of the
resolveContentHandler()
method in the same concrete implementation of this
abstract class when creating the returned ContentHandler
.
factoryName
- The name of the event factory associated with the returned ContentHandler
implementation.
ContentHandler
pre-configured with a event properties.public abstract ContentHandler resolveContentHandler()
ContentHandler
implementation which
is tightly coupled to the type of the concrete implementation of
this abstract class.
It is assumed that implementations of the createContentHandler(String factoryName)
method would reference the implementation of this method in the same concrete implementation of this
abstract class when creating the returned ContentHandler
.
ContentHandler
tightly coupled with this type of this event factory home implementation.public void checkAccess() throws java.lang.SecurityException
SecurityException
.
EventFactoryHome
SecurityManager
for the context of the currently
executing thread to see if the caller has permission to create, retrieve, update
and release Event Factory instances from the Event Factory Home. The caller has
permission if the EventPermission("factory")
permission has been
explicitly granted to the caller.
If the caller has been granted permission the method quietly returns.
Otherwise, the method throws a SecurityException
.
checkAccess
in interface EventFactoryHome
java.lang.SecurityException
- If the SecurityManager
exists and if the caller does not have permission (e.g. EventPermission("factory")
).EventFactoryHome.checkAccess()
public EventFactory getEventFactory(java.lang.String factoryName)
EventFactoryHome
EventFactory
.
An instance of a named EventFactory
is created if
no named instance current exists or a named instance
is released.
Once a named EventFactory
is created, the instance
is cached for future calls to retrieve the same
named EventFactory
.
The name of the EventFactory
uniquely identifies an
instance of an EventFactory
. All subsequent calls will
return the same instance of the named EventFactory
.
EventFactory
names are hierarchal represented using the
standard Java dot-delimited name-space naming conventions.
getEventFactory
in interface EventFactoryHome
factoryName
- The name of the EventFactory
.
EventFactory
.EventFactoryHome.getEventFactory(java.lang.String)
public void updateEventFactory(java.lang.String factoryName)
EventFactoryHome
EventFactory
.
If no named EventFactory
instance exists, no update occurs.
The name of the EventFactory
uniquely identifies an
instance of an EventFactory
. All calls will
update the configuration on the same named instance
of the EventFactory
.
EventFactory
names are hierarchal represented using the
standard Java dot-delimited name-space naming conventions.
updateEventFactory
in interface EventFactoryHome
factoryName
- The name of the EventFactory
.EventFactoryHome.updateEventFactory(java.lang.String)
public void releaseEventFactory(java.lang.String factoryName)
EventFactoryHome
EventFactory
.
If no named EventFactory
instance exists, no release occurs.
The name of the EventFactory
uniquely identifies an
instance of an EventFactory
.
EventFactory
names are hierarchal represented using the
standard Java dot-delimited name-space naming conventions.
releaseEventFactory
in interface EventFactoryHome
factoryName
- The name of the EventFactory
.EventFactoryHome.releaseEventFactory(java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |