From: <sno...@us...> - 2013-09-12 21:02:38
|
Revision: 92 http://sourceforge.net/p/openrpg/svn/92 Author: snowdog_ Date: 2013-09-12 21:02:35 +0000 (Thu, 12 Sep 2013) Log Message: ----------- Depreciated getHandlerId() in favor of getMessageType() in order to make intent a little clearer for future module developers. Modified Paths: -------------- trunk/src/openrpg2/common/core/ORPGMessage.java Modified: trunk/src/openrpg2/common/core/ORPGMessage.java =================================================================== --- trunk/src/openrpg2/common/core/ORPGMessage.java 2013-09-12 20:53:03 UTC (rev 91) +++ trunk/src/openrpg2/common/core/ORPGMessage.java 2013-09-12 21:02:35 UTC (rev 92) @@ -24,8 +24,6 @@ package openrpg2.common.core; import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.CharBuffer; import java.nio.charset.Charset; import java.util.Enumeration; import java.util.Hashtable; @@ -146,6 +144,7 @@ * Retrieves the identifier for the target module of this message. * If the handler is null a 'TYPE_UNKNOWN' will be returned instead. * <i>Note: having TYPE_UNKNOWN is actually an error and this message will fail verifyHeader()</i> + * @deprecated Use getMessageType() instead * @return Identifier as String */ public String getHandlerId(){ @@ -154,6 +153,16 @@ } /** + * gets the identifier of the target module of this message. + * This method is clearer for developers to use than the old getHandlerId() + * @return String identifier for handing module + */ + public String getMessageType(){ + if( handlerId == null){ return ORPGConstants.TYPE_UNKNOWN; } + return handlerId; + } + + /** * Sets the identifier of the target module of this message. * @deprecated Use setMessageType() instead. * @param handler This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |