org.idoox.transport
Class OutputMessage

java.lang.Object
  extended byjava.io.OutputStream
      extended byorg.idoox.transport.OutputMessage
All Implemented Interfaces:
Message
Direct Known Subclasses:
RawOutputMessage

public abstract class OutputMessage
extends java.io.OutputStream
implements Message

Output message with no multipart implementation.

Component:
Core

Field Summary
 
Fields inherited from interface org.idoox.transport.Message
CT_APPLICATION_DIME, CT_MULTIPART_ALTERNATIVE, CT_MULTIPART_MIXED, CT_MULTIPART_RELATED, CT_MUTLIPART_FORMDATA, SC_ACCEPTED, SC_BAD_MESSAGE, SC_CREATED, SC_FORBIDDEN, SC_INTERNAL_ERROR, SC_METHOD_NOT_ALLOWED, SC_NO_CONTENT, SC_NOT_FOUND, SC_OK, SC_PROTOCOL_NOT_SUPPORTED, SC_REQUEST_TIMEOUT, SC_SERVICE_UNAVAILABLE, SC_SOAP_ACTION_REQUIRED, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE
 
Constructor Summary
OutputMessage()
           
 
Method Summary
 void nextPart()
          This starts a new part.
 void setContentType(java.lang.String type)
          Sets the MIME type of the body of the message, or null if the type is not known.
 void setCorrupted()
          This is not a stable part of SSJ's public API, for internal use only!
 void setDateHeader(java.lang.String name, long value)
          Sets the value of the specified message header field as a longvalue.
 void setIntHeader(java.lang.String name, int value)
          Sets the value of the specified message header field as an int.
 void setMultipartType(java.lang.String type)
          Sets multipart type.
abstract  void setStatusCode(int sc)
          Sets the status code.
abstract  void setStringHeader(java.lang.String name, java.lang.String value)
          Sets the value of the specified message header field as a string.
 
Methods inherited from class java.io.OutputStream
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputMessage

public OutputMessage()
Method Detail

setStatusCode

public abstract void setStatusCode(int sc)
Sets the status code. If the transport have no other choice the status code is transported like x-wasp-sc header.

Parameters:
sc - the status code

setContentType

public void setContentType(java.lang.String type)
Sets the MIME type of the body of the message, or null if the type is not known.

Parameters:
type - the MIME type

setStringHeader

public abstract void setStringHeader(java.lang.String name,
                                     java.lang.String value)
Sets the value of the specified message header field as a string.

Parameters:
name - the header name
value - the value of the message header

setIntHeader

public void setIntHeader(java.lang.String name,
                         int value)
Sets the value of the specified message header field as an int.

Parameters:
name - the header name
value - the value of the message header

setDateHeader

public void setDateHeader(java.lang.String name,
                          long value)
Sets the value of the specified message header field as a longvalue. It is a number of milliseconds since January 1, 1970 GMT.

Parameters:
name - the name of the header
value - the number of milliseconds since January 1, 1970 GMT

setMultipartType

public void setMultipartType(java.lang.String type)
                      throws java.io.IOException
Sets multipart type.

Parameters:
type - mutlipart type
Throws:
java.io.IOException - if an I/O error occurs

nextPart

public void nextPart()
              throws java.io.IOException
This starts a new part.

Throws:
java.io.IOException - if an I/O error occurs

setCorrupted

public void setCorrupted()
This is not a stable part of SSJ's public API, for internal use only!

Marks that the upper layer aborted writing of the message and so the written data are corrupted and/or incomplete.

Since:
SSJ 6.5.2