org.aselect.system.communication.server
Class ServletResponseWrapper

java.lang.Object
  extended by org.aselect.system.communication.server.ServletResponseWrapper
All Implemented Interfaces:
IProtocolResponse

public class ServletResponseWrapper
extends java.lang.Object
implements IProtocolResponse

Wrapper to communicate in a transparant manner to a HttpServletResponse.

Description:
This class is a Wrapper for the HttpServletResponse which implements IProtocolResponse.

Concurrency issues:
-

Author:
Alfa & Ariss

Constructor Summary
ServletResponseWrapper(javax.servlet.http.HttpServletResponse oResponse)
          Create a new instance.
 
Method Summary
 java.io.OutputStream getOutputStream()
          Get the ouput stream of the response message.
 void setProperty(java.lang.String name, java.lang.String value)
          Set a property of the response protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletResponseWrapper

public ServletResponseWrapper(javax.servlet.http.HttpServletResponse oResponse)
Create a new instance.

Description:
Creates a new instance wrapping oResponse.

Concurrency issues:
-

Preconditions:
oResponse should be created by a servlet container.

Postconditions:
This instance wraps oResponse.

Parameters:
oResponse - The HttpServletResponse that this wrapper wraps.
Method Detail

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Get the ouput stream of the response message.

Specified by:
getOutputStream in interface IProtocolResponse
Returns:
OutputStream to which the response message can be send.
Throws:
java.io.IOException - if OutputStream can't be retrieved from the protocol
See Also:
IProtocolResponse.getOutputStream()

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Set a property of the response protocol.

Description:
Set the HTTP status code ("Status") or a HTTP header value (e.g. "Content-Type").

Specified by:
setProperty in interface IProtocolResponse
Parameters:
name - the name of the property that has to be set.
value - the value that has to be set.
See Also:
IProtocolResponse.setProperty(java.lang.String, java.lang.String)


Copyright © 2008 SURFnet BV. All Rights Reserved.