com.codestreet.messageforge
Class ConverterBeanAndTibrv

java.lang.Object
  extended bycom.codestreet.messageforge.Converter
      extended bycom.codestreet.messageforge.ConverterBeanAndTibrv

public abstract class ConverterBeanAndTibrv
extends Converter

Converter class for (Java) Beans.

A bean must satisfy the following requirements: it must have a no-arg constructor, all properties that it wishes to be marshalled must have public get/set methods, the get and set methods must follow the design pattern getXXX() or GetXXX()and setXXX() or SetXXX(), and the set methods must take one arg.

Bean properties can primitive types (e.g. int), wrappers of primitive types (e.g. Integer), arrays of primitives (e.g. int[]), arrays of primitive wrappers (e.g. Integer[]), String, Date, BigDecimal,, String[], Date[], BigDecimal[], nested beans and arrays of nested beans.

Author:
jawaid.hakim

Constructor Summary
ConverterBeanAndTibrv()
           
 
Method Summary
static com.tibco.tibrv.TibrvMsg marshal(java.lang.Object bean)
          Marshal a bean into a TIBCO Rendezvous message.
static java.lang.Object unmarshal(com.tibco.tibrv.TibrvMsg source)
          Unmarshal a bean from a TIBCO Rendezvous message.
static java.lang.Object unmarshal(com.tibco.tibrv.TibrvMsg source, java.lang.String beanName, java.lang.String fullName)
          Unmarshal a bean from a TIBCO Rendezvous message.
 
Methods inherited from class com.codestreet.messageforge.Converter
createMsgObject, createMsgObject, dateToDouble, dateToLong, dateToStr, getBeanValidator, getLenient, getVersion, setBeanValidator, setDateFromDouble, setDateFromLong, setDateFromStr, setDefaultFactory, setMaximumFractionDigits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterBeanAndTibrv

public ConverterBeanAndTibrv()
Method Detail

marshal

public static com.tibco.tibrv.TibrvMsg marshal(java.lang.Object bean)
                                        throws ConverterException
Marshal a bean into a TIBCO Rendezvous message.

Parameters:
bean - Bean.
Returns:
Marshalled bean.
Throws:
ConverterException

unmarshal

public static java.lang.Object unmarshal(com.tibco.tibrv.TibrvMsg source)
                                  throws ConverterException
Unmarshal a bean from a TIBCO Rendezvous message.

Parameters:
source - TIBCO Rendezvous message.
Returns:
New bean instance.
Throws:
ConverterException

unmarshal

public static java.lang.Object unmarshal(com.tibco.tibrv.TibrvMsg source,
                                         java.lang.String beanName,
                                         java.lang.String fullName)
                                  throws ConverterException
Unmarshal a bean from a TIBCO Rendezvous message.

Parameters:
source - TIBCO Rendezvous message.
beanName - Short name of bean.
fullName - Full name of bean (includes the package).
Returns:
New bean instance.
Throws:
ConverterException


Copyright © 2003-2006 CodeStreet. All Rights Reserved.