org.objectweb.petals.tools.rmi.server.util
Class Convert

java.lang.Object
  extended by org.objectweb.petals.tools.rmi.server.util.Convert

public final class Convert
extends java.lang.Object

Static class that allow to convert fake client rmi object to concrete petals object and vice and versa.

Author:
nsalatge

Field Summary
static java.lang.String IN_MSG
          IN_MSG.
static java.net.URI IN_ONLY_PATTERN
          inOnly pattern.
static java.net.URI IN_OPTIONAL_OUT_PATTERN
          inOptionalOut pattern.
static java.net.URI IN_OUT_PATTERN
          inOut pattern.
static java.lang.String OUT_MSG
          OUT_MSG.
static java.net.URI ROBUST_IN_ONLY_PATTERN
          RobustInOnly pattern.
 
Method Summary
static javax.jbi.messaging.MessageExchange convertConcreteMessageExchangeToFakeMessageExchange(javax.jbi.messaging.MessageExchange concrete, java.net.URI pattern)
          Convert a concrete message exchange to a fake message exchange.
static java.lang.Exception convertException(java.lang.Exception e)
          Convert an error exception to a RMI exception.
static javax.jbi.JBIException convertJBIException(javax.jbi.JBIException e)
          Convert a concrete messaging exception to fake messaging exception.
static javax.jbi.messaging.MessagingException convertMessagingException(javax.jbi.messaging.MessagingException e)
          Convert a concrete messaging exception to fake messaging exception.
static void setConcreteValueMEToFakeValueME(javax.jbi.component.ComponentContext cc, javax.jbi.messaging.MessageExchange concrete, org.objectweb.petals.tools.rmi.common.serializable.MessageExchange fake)
          Set Concrete Value of Message Exchange in fake message exchange.
static void setFakeValueMEToConcreteValueME(javax.jbi.component.ComponentContext cc, org.objectweb.petals.tools.rmi.common.serializable.MessageExchange fake, javax.jbi.messaging.MessageExchange concrete)
          Set Fake Value of Message Exchange in concrete message exchange.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IN_MSG

public static final java.lang.String IN_MSG
IN_MSG.

See Also:
Constant Field Values

IN_ONLY_PATTERN

public static final java.net.URI IN_ONLY_PATTERN
inOnly pattern.


IN_OPTIONAL_OUT_PATTERN

public static final java.net.URI IN_OPTIONAL_OUT_PATTERN
inOptionalOut pattern.


IN_OUT_PATTERN

public static final java.net.URI IN_OUT_PATTERN
inOut pattern.


OUT_MSG

public static final java.lang.String OUT_MSG
OUT_MSG.

See Also:
Constant Field Values

ROBUST_IN_ONLY_PATTERN

public static final java.net.URI ROBUST_IN_ONLY_PATTERN
RobustInOnly pattern.

Method Detail

convertConcreteMessageExchangeToFakeMessageExchange

public static javax.jbi.messaging.MessageExchange convertConcreteMessageExchangeToFakeMessageExchange(javax.jbi.messaging.MessageExchange concrete,
                                                                                                      java.net.URI pattern)
                                                                                               throws javax.jbi.messaging.MessagingException
Convert a concrete message exchange to a fake message exchange.

Parameters:
concrete - the concrete message
pattern - the pattern of message
Returns:
the fake message
Throws:
javax.jbi.messaging.MessagingException - impossible to realize the conversion

convertJBIException

public static final javax.jbi.JBIException convertJBIException(javax.jbi.JBIException e)
Convert a concrete messaging exception to fake messaging exception.

Parameters:
e - the concrete messaging exception
Returns:
the fake messaging exception

convertMessagingException

public static final javax.jbi.messaging.MessagingException convertMessagingException(javax.jbi.messaging.MessagingException e)
Convert a concrete messaging exception to fake messaging exception.

Parameters:
e - the concrete messaging exception
Returns:
the fake messaging exception

convertException

public static java.lang.Exception convertException(java.lang.Exception e)
Convert an error exception to a RMI exception.

Parameters:
e - the concrete messaging exception
Returns:
the fake messaging exception

setConcreteValueMEToFakeValueME

public static void setConcreteValueMEToFakeValueME(javax.jbi.component.ComponentContext cc,
                                                   javax.jbi.messaging.MessageExchange concrete,
                                                   org.objectweb.petals.tools.rmi.common.serializable.MessageExchange fake)
                                            throws javax.jbi.messaging.MessagingException
Set Concrete Value of Message Exchange in fake message exchange.

Parameters:
cc - the component context
fake - the fake message exchange
concrete - the concrete message exchange
Throws:
javax.jbi.messaging.MessagingException - impossible to realize the conversion

setFakeValueMEToConcreteValueME

public static void setFakeValueMEToConcreteValueME(javax.jbi.component.ComponentContext cc,
                                                   org.objectweb.petals.tools.rmi.common.serializable.MessageExchange fake,
                                                   javax.jbi.messaging.MessageExchange concrete)
                                            throws javax.jbi.messaging.MessagingException
Set Fake Value of Message Exchange in concrete message exchange.

Parameters:
cc - the component context
fake - the fake message exchange
concrete - the concrete message exchange
Throws:
javax.jbi.messaging.MessagingException - impossible to realize the conversion


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.