org.idoox.transport
Interface Connection

All Known Subinterfaces:
ClientConnection, ServerConnection

public interface Connection

This class represents the transport connection. This is a holder for input and output messages.

Component:
Core

Method Summary
 InputMessage getInputMessage()
          Gets an input message.
 TransportMethod getMethod()
          Gets a method for this connection.
 OutputMessage getOutputMessage()
          Gets an output message.
 URI getURI()
          Gets the connection URI.
 void setInputMessage(InputMessage message)
          Sets an input message.
 void setOutputMessage(OutputMessage message)
          Sets an output message.
 

Method Detail

getInputMessage

public InputMessage getInputMessage()
Gets an input message.

Returns:
the message or null if this connection doesn't contain input message

setInputMessage

public void setInputMessage(InputMessage message)
Sets an input message.

Parameters:
message - a new input message

getOutputMessage

public OutputMessage getOutputMessage()
Gets an output message.

Returns:
the message or null if this connection doesn't contain output message

setOutputMessage

public void setOutputMessage(OutputMessage message)
Sets an output message.

Parameters:
message - a new output message

getMethod

public TransportMethod getMethod()
Gets a method for this connection.

Returns:
the method like TransportMethod.POST

getURI

public URI getURI()
Gets the connection URI.

Returns:
the given URI