org.aselect.system.communication.server
Interface IProtocolResponse

All Known Implementing Classes:
ServletResponseWrapper, TCPProtocolResponse

public interface IProtocolResponse

Defines an interface to the response part of a protocol.

Description:
This interface contains methods to modify and add data and control information to the response.

Concurrency issues:
-

Author:
Alfa & Ariss

Method Summary
 java.io.OutputStream getOutputStream()
          Return an output stream.
 void setProperty(java.lang.String sName, java.lang.String sValue)
          Set a property of the response protocol.
 

Method Detail

setProperty

void setProperty(java.lang.String sName,
                 java.lang.String sValue)
Set a property of the response protocol.

Description:
Sets a property in the response. For e.g. HTTP these properties are headers like "Content-type" or the status code.

Concurrency issues:
-

Preconditions:

Postconditions:
The response contains the new property.

Parameters:
sName - the name of the property that has to be set.
sValue - the value that has to be set.

getOutputStream

java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Return an output stream.

Description:
Returns an output stream, which can be used to write the data to.

Concurrency issues:
The returned OutputStream should be used once.

Preconditions:
-

Postconditions:
-

Returns:
OutputStream to which the response message can be send.
Throws:
java.io.IOException - if OutputStream can't be retrieved from the protocol


Copyright © 2008 SURFnet BV. All Rights Reserved.