xmlBlaster 2.2.0 API

org.xmlBlaster.util.def
Class MethodName

java.lang.Object
  extended by org.xmlBlaster.util.def.MethodName
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public final class MethodName
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

This class holds all method names to access xmlBlaster.

Author:
xmlBlaster@marcelruff.info
See Also:
The interface requirement, Serialized Form

Nested Class Summary
private static class MethodName.SerializedForm
           
 
Field Summary
private static int ARG_KEYQOS
           
private static int ARG_MSGARR
           
private static int ARG_QOS
           
private static int ARG_STR_MSGARR
           
private  int argType
           
static MethodName CONNECT
           
static MethodName DISCONNECT
           
static MethodName DUMMY
           
static MethodName ERASE
           
static MethodName EXCEPTION
           
static MethodName GET
           
private static java.util.Hashtable hash
           
private  java.lang.String methodName
           
private  byte[] methodNameBytes
           
static MethodName PING
           
static MethodName PUBLISH
           
static MethodName PUBLISH_ARR
           
static MethodName PUBLISH_ONEWAY
           
static MethodName PUBLISH_PTP
          for convenience only: not used by xmlBlaster itself
static MethodName PUBLISH_PTP_ARR
          for convenience only: not used by xmlBlaster itself
static MethodName PUBLISH_PTP_ONEWAY
          for convenience only: not used by xmlBlaster itself
private static int RETURN_MSGARR
           
private static int RETURN_STRING
           
private static int RETURN_STRINGARR
           
private static int RETURN_VOID
           
private  int returnType
           
private static long serialVersionUID
           
static MethodName SUBSCRIBE
           
static MethodName UNKNOWN
           
static MethodName UNSUBSCRIBE
           
static MethodName UPDATE
           
static MethodName UPDATE_ONEWAY
           
 
Constructor Summary
private MethodName(java.lang.String methodName, int argType, int returnType)
           
 
Method Summary
 int compareTo(java.lang.Object other)
           
 boolean equals(MethodName other)
          When you compare two methodName with == and they are loaded by different Classloaders it will fail (return false even if they are the same method), using this equals() method is safe under such circumstances
 boolean equals(java.lang.String other)
          When you compare two methodName with == and they are loaded by different Classloaders it will fail (return false even if they are the same method), using this equals() method is safe under such circumstances
static MethodName[] getAll()
           
 java.lang.String getMethodName()
          Returns the methodName.
 byte[] getMethodNameBytes()
          For better performance in SOCKET protocol.
 boolean isConnect()
           
 boolean isDisconnect()
           
 boolean isErase()
           
 boolean isGet()
           
 boolean isPublish()
           
 boolean isPublishArray()
           
 boolean isPublishOnway()
           
 boolean isPublishType()
           
 boolean isSubscribe()
           
 boolean isUnSubscribe()
           
static void main(java.lang.String[] args)
           java org.xmlBlaster.util.def.MethodName
 boolean returnsMsgArr()
           
 boolean returnsString()
           
 boolean returnsStringArr()
           
 boolean returnsVoid()
           
static MethodName toMethodName(byte[] methodNameBytes)
           
static MethodName toMethodName(java.lang.String methodName)
          Returns the MethodName object for the given String.
 java.lang.String toString()
          Return the methodName.
static java.lang.String toString(MethodName[] nameArr)
           
 boolean wantsKeyQosArg()
           
 boolean wantsMsgArrArg()
           
 boolean wantsQosArg()
           
 boolean wantsStrMsgArrArg()
           
 java.lang.Object writeReplace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

hash

private static final java.util.Hashtable hash

methodName

private final java.lang.String methodName

argType

private final int argType

returnType

private final int returnType

methodNameBytes

private transient byte[] methodNameBytes

RETURN_VOID

private static final int RETURN_VOID
See Also:
Constant Field Values

RETURN_STRING

private static final int RETURN_STRING
See Also:
Constant Field Values

RETURN_STRINGARR

private static final int RETURN_STRINGARR
See Also:
Constant Field Values

RETURN_MSGARR

private static final int RETURN_MSGARR
See Also:
Constant Field Values

ARG_QOS

private static final int ARG_QOS
See Also:
Constant Field Values

ARG_KEYQOS

private static final int ARG_KEYQOS
See Also:
Constant Field Values

ARG_MSGARR

private static final int ARG_MSGARR
See Also:
Constant Field Values

ARG_STR_MSGARR

private static final int ARG_STR_MSGARR
See Also:
Constant Field Values

CONNECT

public static final MethodName CONNECT

DISCONNECT

public static final MethodName DISCONNECT

GET

public static final MethodName GET

ERASE

public static final MethodName ERASE

PUBLISH

public static final MethodName PUBLISH

PUBLISH_ARR

public static final MethodName PUBLISH_ARR

PUBLISH_ONEWAY

public static final MethodName PUBLISH_ONEWAY

SUBSCRIBE

public static final MethodName SUBSCRIBE

UNSUBSCRIBE

public static final MethodName UNSUBSCRIBE

UPDATE

public static final MethodName UPDATE

UPDATE_ONEWAY

public static final MethodName UPDATE_ONEWAY

PING

public static final MethodName PING

DUMMY

public static final MethodName DUMMY

UNKNOWN

public static final MethodName UNKNOWN

EXCEPTION

public static final MethodName EXCEPTION

PUBLISH_PTP

public static final MethodName PUBLISH_PTP
for convenience only: not used by xmlBlaster itself


PUBLISH_PTP_ARR

public static final MethodName PUBLISH_PTP_ARR
for convenience only: not used by xmlBlaster itself


PUBLISH_PTP_ONEWAY

public static final MethodName PUBLISH_PTP_ONEWAY
for convenience only: not used by xmlBlaster itself

Constructor Detail

MethodName

private MethodName(java.lang.String methodName,
                   int argType,
                   int returnType)
Throws:
java.lang.IllegalArgumentException - if the given methodName is null
Method Detail

getAll

public static MethodName[] getAll()

toString

public java.lang.String toString()
Return the methodName.

Overrides:
toString in class java.lang.Object

toString

public static java.lang.String toString(MethodName[] nameArr)
Returns:
the comma separated methodNames, never null

getMethodName

public java.lang.String getMethodName()
Returns the methodName.


isConnect

public boolean isConnect()

isDisconnect

public boolean isDisconnect()

isPublish

public boolean isPublish()

isPublishOnway

public boolean isPublishOnway()

isPublishArray

public boolean isPublishArray()

isPublishType

public boolean isPublishType()

isSubscribe

public boolean isSubscribe()

isUnSubscribe

public boolean isUnSubscribe()

isGet

public boolean isGet()

isErase

public boolean isErase()

equals

public boolean equals(MethodName other)
When you compare two methodName with == and they are loaded by different Classloaders it will fail (return false even if they are the same method), using this equals() method is safe under such circumstances


equals

public boolean equals(java.lang.String other)
When you compare two methodName with == and they are loaded by different Classloaders it will fail (return false even if they are the same method), using this equals() method is safe under such circumstances


compareTo

public int compareTo(java.lang.Object other)
Specified by:
compareTo in interface java.lang.Comparable

getMethodNameBytes

public byte[] getMethodNameBytes()
For better performance in SOCKET protocol.

Returns:
methodName dumped to a byte[]

wantsQosArg

public boolean wantsQosArg()

wantsKeyQosArg

public boolean wantsKeyQosArg()

wantsMsgArrArg

public boolean wantsMsgArrArg()

wantsStrMsgArrArg

public boolean wantsStrMsgArrArg()

returnsVoid

public boolean returnsVoid()

returnsString

public boolean returnsString()

returnsStringArr

public boolean returnsStringArr()

returnsMsgArr

public boolean returnsMsgArr()

toMethodName

public static final MethodName toMethodName(java.lang.String methodName)
                                     throws java.lang.IllegalArgumentException
Returns the MethodName object for the given String.

Parameters:
methodName - The String code to lookup
Returns:
The enumeration object for this methodName
Throws:
java.lang.IllegalArgumentException - if the given methodName is invalid

toMethodName

public static final MethodName toMethodName(byte[] methodNameBytes)
                                     throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

writeReplace

public java.lang.Object writeReplace()
                              throws java.io.ObjectStreamException
Throws:
java.io.ObjectStreamException

main

public static void main(java.lang.String[] args)
  java org.xmlBlaster.util.def.MethodName
 


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.