|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectanima.component.javalocal.JavaLocalComponentFactory
public class JavaLocalComponentFactory
This an Factory of Local components. This class create an local component based on IComponenteFactory, more information about it's interface
Implements the interface IComponentFactory
This UML diagram represent class JavaLocalComponentFactory| Constructor Summary | |
|---|---|
JavaLocalComponentFactory()
|
|
| Method Summary | |
|---|---|
void |
assignMessageFactory(IMessageFactory messageFactory)
Assign an message factory that will be used to component. |
IUnknown |
createInstance(java.lang.String classId,
java.lang.String primaryKey)
public IUnknown createInstance(String classId, String primaryKey) { IUnknown component = null; if (classId.equalsIgnoreCase(StatisticsComponent.STATISTICSCOMPONENT_ID)) component = new StatisticsComponent(primaryKey); else if (classId.equalsIgnoreCase(StatisticsConsumerComponent.STATISTICSCONSUMERCOMPONENT_ID)) component = new StatisticsConsumerComponent(primaryKey); else if (classId.equalsIgnoreCase(StatisticsComponentSyncMessage.STATISTICSCOMPONENTMESSAGE_ID)) component = new StatisticsComponentSyncMessage(primaryKey); else if (classId.equalsIgnoreCase(StatisticsConsumerComponentSyncMessage.STATISTICSCONSUMERCOMPONENTMESSAGE_ID)) component = new StatisticsConsumerComponentSyncMessage(primaryKey); else if (classId.equalsIgnoreCase(StatisticsComponentAssyncMessage.STATISTICSCOMPONENTMESSAGE_ID)) component = new StatisticsComponentAssyncMessage(primaryKey); else if (classId.equalsIgnoreCase(StatisticsConsumerComponentAssyncMessage.STATISTICSCONSUMERCOMPONENTMESSAGE_ID)) component = new StatisticsConsumerComponentAssyncMessage(primaryKey); if (messageFactory ! |
IUnknown |
createInstance(java.lang.String classId,
java.lang.String primaryKey,
java.lang.String interfaceId)
Create an instance and return it's interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaLocalComponentFactory()
| Method Detail |
|---|
public IUnknown createInstance(java.lang.String classId,
java.lang.String primaryKey)
public IUnknown createInstance(String classId, String primaryKey) {
IUnknown component = null;
if (classId.equalsIgnoreCase(StatisticsComponent.STATISTICSCOMPONENT_ID))
component = new StatisticsComponent(primaryKey);
else if (classId.equalsIgnoreCase(StatisticsConsumerComponent.STATISTICSCONSUMERCOMPONENT_ID))
component = new StatisticsConsumerComponent(primaryKey);
else if (classId.equalsIgnoreCase(StatisticsComponentSyncMessage.STATISTICSCOMPONENTMESSAGE_ID))
component = new StatisticsComponentSyncMessage(primaryKey);
else if (classId.equalsIgnoreCase(StatisticsConsumerComponentSyncMessage.STATISTICSCONSUMERCOMPONENTMESSAGE_ID))
component = new StatisticsConsumerComponentSyncMessage(primaryKey);
else if (classId.equalsIgnoreCase(StatisticsComponentAssyncMessage.STATISTICSCOMPONENTMESSAGE_ID))
component = new StatisticsComponentAssyncMessage(primaryKey);
else if (classId.equalsIgnoreCase(StatisticsConsumerComponentAssyncMessage.STATISTICSCONSUMERCOMPONENTMESSAGE_ID))
component = new StatisticsConsumerComponentAssyncMessage(primaryKey);
if (messageFactory != null && component instanceof IComponentMessageDriven)
((IComponentMessageDriven)component).assignMessageFactory(messageFactory);
return component;
}
This is an parameterized Factory Method get two parameters and return an
instance.
createInstance in interface IComponentFactoryclassId - This attribute refers to the ID of the class.primaryKey - This attribute refers to the Primary Key that identifies the component.
public IUnknown createInstance(java.lang.String classId,
java.lang.String primaryKey,
java.lang.String interfaceId)
public IUnknown createInstance(String classId, String primaryKey,
String interfaceId) {
IUnknown componentInterface = null;
IUnknown component = createInstance(classId, primaryKey);
if (component != null)
componentInterface = component.queryInterface(interfaceId);
return componentInterface;
}
createInstance in interface IComponentFactoryclassId - This attribute refers to the ID of the class.primaryKey - This attribute refers to the Primary Key that identifies the component.interfaceId - This attribute refers to the ID if the interface.
public void assignMessageFactory(IMessageFactory messageFactory)
public void assignMessageFactory(IMessageFactory messageFactory) {
this.messageFactory = messageFactory;
}
assignMessageFactory in interface IComponentFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||