|
xmlBlaster 1.6.2 client API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.util.protocol.ProtoConverter
This is a utility class used to convert general xmlBlaster data to data is protocol-specific. This is necessary in cases where the protocol does not support a particular data type. This class is used extensively in the xml-rpc protocol where user-defined classes are not supported.
| Constructor Summary | |
ProtoConverter()
|
|
| Method Summary | |
static void |
main(java.lang.String[] args)
For testing ... |
static java.util.Vector |
messageUnit2Vector(MsgUnitRaw msg)
Converts a single MsgUnitRaw to a Vector. |
static java.util.Vector |
messageUnitArray2Vector(MsgUnitRaw[] msgs)
Converts a MsgUnitRaw[] object into a Vector. |
static java.util.Vector |
stringArray2Vector(java.lang.String[] strings)
Converts a String[] into a Vector object. |
static MsgUnitRaw |
vector2MsgUnitRaw(java.util.Vector vec)
Converts a Vector to a MsgUnitRaw. |
static MsgUnitRaw[] |
vector2MsgUnitRawArray(java.util.Vector vec)
Converts a Vector to a MsgUnitRaw[]. |
static java.lang.String |
vector2String(java.util.Vector vec)
Converts one element of a Vector to a String object. |
static java.lang.String[] |
vector2StringArray(java.util.Vector vec)
Converts a Vector to a String[] object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ProtoConverter()
| Method Detail |
public static MsgUnitRaw vector2MsgUnitRaw(java.util.Vector vec)
throws XmlBlasterException
vec - the vector to convert
XmlBlasterException - if the size of vec is different from 3, or
if the type of the vector elements does not
correspond to the MsgUnitRaw equivalent.public static java.util.Vector messageUnit2Vector(MsgUnitRaw msg)
msg - the MsgUnitRaw to convert to a Vector.
public static MsgUnitRaw[] vector2MsgUnitRawArray(java.util.Vector vec)
throws XmlBlasterException
vec - the input Vector (of Vector).
XmlBlasterException - if the types in the input vector are not
consistent with the required types.public static java.util.Vector messageUnitArray2Vector(MsgUnitRaw[] msgs)
msgs - The array of MsgUnitRaw objects to convert to a Vector object.
public static java.lang.String[] vector2StringArray(java.util.Vector vec)
throws XmlBlasterException
vec - vector containing the Strings to be converted.
XmlBlasterException - if the elements in the Vector where not valid
String objects.
public static java.lang.String vector2String(java.util.Vector vec)
throws XmlBlasterException
vec - vector containing the String to be converted.
XmlBlasterException - if the element in the Vector is not a valid
String object.public static java.util.Vector stringArray2Vector(java.lang.String[] strings)
strings - array of String objects to convert to a Vector.
public static void main(java.lang.String[] args)
|
xmlBlaster 1.6.2 client API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||