com.codestreet.messageforge
Interface RMsgFactory

All Known Implementing Classes:
RMsgFactoryImpl

public interface RMsgFactory

Interface implemented by all message factories.

Author:
Jawaid Hakim.

Method Summary
 RMapMessage createMsgObject(java.lang.Class cls)
          Create message instance from Class.
 RMapMessage createMsgObject(java.lang.Class cls, boolean create)
          Create message instance from Class.
 RMapMessage createMsgObject(java.lang.String msgName)
          Create message instance from message name.
 RMapMessage createMsgObject(java.lang.String msgName, boolean create)
          Create message instance from message name.
 java.lang.String[] getBeanFieldNames()
          Get all bean field class names in this factory.
 java.lang.String getFullBeanFieldName(java.lang.String beanField)
          Get fully qualified name of specified bean field.
 java.lang.String[] getMsgNames()
          Get all message names in this factory.
 java.lang.String getQualifiedName(java.lang.String msgName)
          Get the fully qualified name of message class for given message name.
 

Method Detail

createMsgObject

public RMapMessage createMsgObject(java.lang.String msgName)
                            throws FactoryException
Create message instance from message name. The message name is the fully qualified (including package specification) name of the message class.

Parameters:
msgName - Message name.
Returns:
Message instance.
Throws:
FactoryException

createMsgObject

public RMapMessage createMsgObject(java.lang.String msgName,
                                   boolean create)
                            throws FactoryException
Create message instance from message name. The message name is the fully qualified (including package specification) name of the message class.

Parameters:
msgName - Message name.
create - If true then nested fields of type MSGOBJ and BEAN are precreated.
Returns:
Message instance.
Throws:
FactoryException

createMsgObject

public RMapMessage createMsgObject(java.lang.Class cls)
                            throws FactoryException
Create message instance from Class.

Parameters:
cls - Class.
Returns:
Message instance.
Throws:
FactoryException

createMsgObject

public RMapMessage createMsgObject(java.lang.Class cls,
                                   boolean create)
                            throws FactoryException
Create message instance from Class.

Parameters:
cls - Class.
create - If true then nested fields of type MSGOBJ and BEAN are precreated.
Returns:
Message instance.
Throws:
FactoryException

getMsgNames

public java.lang.String[] getMsgNames()
Get all message names in this factory.

Returns:
Message names in this factory.

getQualifiedName

public java.lang.String getQualifiedName(java.lang.String msgName)
                                  throws FactoryException
Get the fully qualified name of message class for given message name.

Parameters:
msgName - Message name.
Returns:
Fully qualified name of message class.
Throws:
FactoryException

getBeanFieldNames

public java.lang.String[] getBeanFieldNames()
Get all bean field class names in this factory.

Returns:
All bean field class names in this factory.

getFullBeanFieldName

public java.lang.String getFullBeanFieldName(java.lang.String beanField)
Get fully qualified name of specified bean field.

Parameters:
beanField - Name of bean field.
Returns:
fully qualified name of specified bean field.


Copyright © 2003-2006 CodeStreet. All Rights Reserved.