View Javadoc
1 /*** 2 * Copyright (c) 2002, CodeStreet LLC. All rights reserved.<p> 3 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following 4 * conditions are met:<p> 5 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer 7 * in the documentation and/or other materials provided with the distribution. Neither the name of CodeStreet LLC. nor the 8 * names of its contributors may be used to endorse or promote products derived from this software without specific prior written 9 * permission.<p> 10 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 11 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 12 * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 13 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 14 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 15 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<p> 16 */ 17 18 package com.codestreet.messageforge; 19 20 /*** 21 * Interface implemented by all message factories. 22 * 23 * @author Jawaid Hakim. 24 */ 25 public interface RMsgFactory 26 { 27 /*** 28 * Create message instance from message name. The message name is the fully 29 * qualified (including package specification) name of the message class. 30 * 31 * @param msgName 32 * Message name. 33 * @return Message instance. 34 */ 35 RMapMessage createMsgObject(String msgName) throws FactoryException; 36 37 /*** 38 * Create message instance from message name. The message name is the fully 39 * qualified (including package specification) name of the message class. 40 * 41 * @param msgName 42 * Message name. 43 * @param create 44 * If <tt>true</tt> then nested fields of type <tt>MSGOBJ</tt> 45 * and <tt>BEAN</tt> are precreated. 46 * @return Message instance. 47 */ 48 RMapMessage createMsgObject(String msgName, boolean create) 49 throws FactoryException; 50 51 /*** 52 * Create message instance from <tt>Class</tt>. 53 * 54 * @param cls 55 * Class. 56 * @return Message instance. 57 */ 58 RMapMessage createMsgObject(java.lang.Class cls) throws FactoryException; 59 60 /*** 61 * Create message instance from <tt>Class</tt>. 62 * 63 * @param cls 64 * Class. 65 * @param create 66 * If <tt>true</tt> then nested fields of type <tt>MSGOBJ</tt> 67 * and <tt>BEAN</tt> are precreated. 68 * @return Message instance. 69 */ 70 RMapMessage createMsgObject(java.lang.Class cls, boolean create) 71 throws FactoryException; 72 73 /*** 74 * Get all message names in this factory. 75 * 76 * @return Message names in this factory. 77 */ 78 String[] getMsgNames(); 79 80 /*** 81 * Get the fully qualified name of message class for given message name. 82 * 83 * @param msgName 84 * Message name. 85 * @return Fully qualified name of message class. 86 */ 87 String getQualifiedName(String msgName) throws FactoryException; 88 89 /*** 90 * Get all bean field class names in this factory. 91 * 92 * @return All bean field class names in this factory. 93 */ 94 String[] getBeanFieldNames(); 95 96 /*** 97 * Get fully qualified name of specified bean field. 98 * 99 * @param beanField 100 * Name of bean field. 101 * @return fully qualified name of specified bean field. 102 */ 103 String getFullBeanFieldName(String beanField); 104 }

This page was automatically generated by Maven