org.apache.camel.component.gae.bind
Interface OutboundBinding<E extends Endpoint,S,T>

All Known Implementing Classes:
GHttpBinding, GMailBinding, GTaskBinding

public interface OutboundBinding<E extends Endpoint,S,T>

Represents the binding of request and response types to an Exchange. The request and response types are defined via the type parameters S and T, respectively. The OutboundBinding is used by Producer implementations to translate between Exchange objects and protocol-specific or services-specific messages.


Method Summary
 Exchange readResponse(E endpoint, Exchange exchange, T response)
          Populates an Exchange from response data and endpoint configuration data.
 S writeRequest(E endpoint, Exchange exchange, S request)
          Creates or populates a request object from Exchange and endpoint configuration data.
 

Method Detail

writeRequest

S writeRequest(E endpoint,
               Exchange exchange,
               S request)
               throws Exception
Creates or populates a request object from Exchange and endpoint configuration data.

Parameters:
endpoint - endpoint providing binding-relevant information.
exchange - exchange to read data from.
request - request to be populated or created (if null) from exchange data.
Returns:
the populated response.
Throws:
Exception

readResponse

Exchange readResponse(E endpoint,
                      Exchange exchange,
                      T response)
                      throws Exception
Populates an Exchange from response data and endpoint configuration data.

Parameters:
endpoint - endpoint providing binding-relevant information.
exchange - exchange to be populated or created (if null) from response data.
response - response to read data from.
Returns:
the populated exchange.
Throws:
Exception


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.