org.ow2.petals.transport
Interface Transporter

All Known Implementing Classes:
LocalTransporterImpl, NioTransporterImpl

public interface Transporter

The Transporter is used to send a MessageExchange from a Petals container to another one.
The local Router calls send(exchange,distantContainer) on this Transporter to send an exchange.
This Transporter sends the MessageExchange to the distant Transporter.
When the distant Transporter receives the MessageExchange, it has to call receive(exchange) on its local Router.
The localization of the distant container is in charge of the Transporter.

Note that the destination container can be the same than this one.

Since:
Petals 1.0
Version:
$Rev: 477 $ $Date: 2006-05-29 17:18:07 +0200 (lun., 29 mai 2006) $
Author:
alouis - EBM Websourcing, rnaudin - EBM Websourcing

Field Summary
static java.lang.String HTTP_FRACTAL_TRANSPORTER
           
static java.lang.String LOCAL_FRACTAL_TRANSPORTER
          The list of provided transporter.
static java.lang.String SSL_FRACTAL_TRANSPORTER
           
static java.lang.String TCP_FRACTAL_TRANSPORTER
           
 
Method Summary
 void send(org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator, TransportSendContext transportContext)
          Send the specified exchange to the specified container.
 void sendSync(org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator, TransportSendContext transportContext)
          Send the specified exchange to the specified container and wait until the response is received or the timeout is reached.
 void stopTraffic()
          Prepare the stopping of the component.
 

Field Detail

LOCAL_FRACTAL_TRANSPORTER

static final java.lang.String LOCAL_FRACTAL_TRANSPORTER
The list of provided transporter. Note that in standalone distribution, only the LOCAL_FRACTAL_TRANSPORTER is supported

See Also:
Constant Field Values

TCP_FRACTAL_TRANSPORTER

static final java.lang.String TCP_FRACTAL_TRANSPORTER
See Also:
Constant Field Values

SSL_FRACTAL_TRANSPORTER

static final java.lang.String SSL_FRACTAL_TRANSPORTER
See Also:
Constant Field Values

HTTP_FRACTAL_TRANSPORTER

static final java.lang.String HTTP_FRACTAL_TRANSPORTER
See Also:
Constant Field Values
Method Detail

send

void send(org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator,
          TransportSendContext transportContext)
          throws TransportException
Send the specified exchange to the specified container. According to the transport policy, the message is may be not persisted by the Transport layer, so it can be lost in case of problem.

Parameters:
exchangeDecorator - the exchange decorator to send.
componentName - the name of the distant container.
containerName - the name of the distant container.
subDomainName - the name of the sub-domain of the remote container.
timeToLive - duration of the message life (in ms). 0 for no duration
Throws:
TransportException - If the exchange is invalid, or can not be serialized. If the distant container can not be found.

sendSync

void sendSync(org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator,
              TransportSendContext transportContext)
              throws TransportException
Send the specified exchange to the specified container and wait until the response is received or the timeout is reached. According to the transport policy, the message is may be not persisted by the Transport layer, so it can be lost in case of problem.

Parameters:
exchangeDecorator - the exchange decorator to send.
componentName - the name of the distant container.
containerName - the name of the distant container. non empty
subDomainName - the name of the sub-domain of the remote container.
timeToLive - duration of the message life (in ms). 0 for no duration
Throws:
TransportException - If the exchange is invalid, or can not be serialized. If the distant container can not be found.

stopTraffic

void stopTraffic()
Prepare the stopping of the component. It means that all ongoing message traffic must terminate during the method invocation and all new message traffic is rejected.



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