org.eclipse.hyades.logging.events
Class EventFactoryHome

java.lang.Object
  |
  +--org.eclipse.hyades.logging.events.EventFactoryHome

Deprecated. This class is deprecated as of 2004-05-17. Use the corresponding class available in org.eclipse.hyades.logging.events.cbe*

public final class EventFactoryHome
extends java.lang.Object

Utility class to obtain a new factory instance.

Since:
1.0
Version:
1.0.1

Field Summary
protected static java.lang.String INTERFACE_PREFIX
          Deprecated. A prefix used to derive the expected factory class name from the event class name
 
Constructor Summary
EventFactoryHome()
          Deprecated.  
 
Method Summary
static IEventFactory getFactory(java.lang.String instanceName, java.lang.String eventInterface)
          Deprecated. Method to obtain an instance of an event factory.
 void releaseFactory(IEventFactory factory)
          Deprecated. Method to release an instance of an event factory, when no longer needed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERFACE_PREFIX

protected static final java.lang.String INTERFACE_PREFIX
Deprecated. 
A prefix used to derive the expected factory class name from the event class name

See Also:
Constant Field Values
Constructor Detail

EventFactoryHome

public EventFactoryHome()
Deprecated. 
Method Detail

getFactory

public static IEventFactory getFactory(java.lang.String instanceName,
                                       java.lang.String eventInterface)
                                throws CannotCreateEventFactoryException
Deprecated. 
Method to obtain an instance of an event factory.

Parameters:
instanceName - The name of the factory instance.
eventInterface - The interface for events created by this factory.

If a factory instance already exists with the desired name and event interface, it will be returned.

If no such instance yet exists, it will be created. The factory class (whose name is derived by removing any leading 'I' from the event interface class name, then appending 'Factory') will be loaded and instantiated, and the instance name will be set via the init() method.

Returns:
The new (or pre-existing) event factory instance.
Throws:
CannotCreateEventFactoryException - Thrown if the desired event factory does not exist and cannot be created. If the event interface is named IFooEvent, the factory class must be named FooEventFactoryImpl (no 'I'), and must be a public class that implements IEventFactory and allows new instances to be created.

releaseFactory

public void releaseFactory(IEventFactory factory)
Deprecated. 
Method to release an instance of an event factory, when no longer needed.

Parameters:
factory - The factory instance.