com.esri.arcgis.server
Class ResponseStreamer

java.lang.Object
  extended by com.esri.arcgis.server.ResponseStreamer
All Implemented Interfaces:
IResponseStreamer

public class ResponseStreamer
extends java.lang.Object
implements IResponseStreamer

This class writes a response stream generated by Server objects and Server object extensions directly into the REST/SOAP handler completely bypassing the RMI transport. NOTE: The buffer size is determined by the tomcat buffer size which is is 8192 bytes. This means that tomcat will write 8192 sized response packets to clients. This size cannot be changed per this discussion. http://mail-archives.apache.org/mod_mbox/tomcat-dev/200408.mbox/%3C018301c47f2b$3b381930$6c37a8c0@bbarkerxp%3E *


Field Summary
static int LOG_LEVEL_DEBUG
           
static int LOG_LEVEL_INFO_1
           
static int LOG_LEVEL_INFO_2
           
static int LOG_LEVEL_INFO_3
           
static int LOG_LEVEL_SEVERE
           
static int LOG_LEVEL_WARNING
           
 
Fields inherited from interface com.esri.arcgis.server.IResponseStreamer
IID, IIDe7b4f042_dd12_3ce9_a801_0f47bc498f47, xxDummy
 
Constructor Summary
ResponseStreamer()
          Initializes this object
 
Method Summary
 void close()
          Closes the response stream.
 int getBufferSize()
          The size of each response chunk that the client will receive.
 void init(java.lang.String contentType, java.lang.String charEncoding)
          Initializes the Response streamer.
 void write(byte[] bytes)
          Writes a byte array as a response stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_LEVEL_SEVERE

public static final int LOG_LEVEL_SEVERE
See Also:
Constant Field Values

LOG_LEVEL_WARNING

public static final int LOG_LEVEL_WARNING
See Also:
Constant Field Values

LOG_LEVEL_INFO_1

public static final int LOG_LEVEL_INFO_1
See Also:
Constant Field Values

LOG_LEVEL_INFO_2

public static final int LOG_LEVEL_INFO_2
See Also:
Constant Field Values

LOG_LEVEL_INFO_3

public static final int LOG_LEVEL_INFO_3
See Also:
Constant Field Values

LOG_LEVEL_DEBUG

public static final int LOG_LEVEL_DEBUG
See Also:
Constant Field Values
Constructor Detail

ResponseStreamer

public ResponseStreamer()
                 throws java.lang.Exception
Initializes this object

Throws:
java.lang.Exception
Method Detail

init

public void init(java.lang.String contentType,
                 java.lang.String charEncoding)
Initializes the Response streamer.

Specified by:
init in interface IResponseStreamer
Parameters:
contentType - The contentType (in)
contentEncoding - The contentEncoding (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBufferSize

public int getBufferSize()
The size of each response chunk that the client will receive.

Specified by:
getBufferSize in interface IResponseStreamer
Returns:
The size
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

write

public void write(byte[] bytes)
Writes a byte array as a response stream.

Specified by:
write in interface IResponseStreamer
Parameters:
bytes - An unsigned byte (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

close

public void close()
Closes the response stream.

Specified by:
close in interface IResponseStreamer
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.