com.ibm.security.certclient.base

Class PkHttpRepEvent

  1. java.lang.Object
  2. extended byjava.util.EventObject
  3. extended bycom.ibm.security.certclient.base.PkEvent
  4. extended bycom.ibm.security.certclient.base.PkRepEvent
  5. extended bycom.ibm.security.certclient.base.PkHttpRepEvent
All implemented interfaces:
Serializable

  1. public class PkHttpRepEvent
  2. extends PkRepEvent
HTTP reply events.
Author:
Rod Mancisidor
See Also:
Serialized Form

Field Summary

Fields inherited from class com.ibm.security.certclient.base.PkEvent
msg
Fields inherited from class java.util.EventObject
source

Constructor Summary

Constructor and Description
PkHttpRepEvent(Object source,Object msg,PkReqEvent req,String contentType,byte[] reply)
Constructs a PkHttpRepEvent.
PkHttpRepEvent(Object source,Object msg,PkReqEvent req,String contentType,InputStream inputStream)
Constructs a PkHttpRepEvent.
PkHttpRepEvent(Object source,Object msg,PkReqEvent req,String contentType,String reply)
Constructs a PkHttpRepEvent.

Method Summary

Modifier and Type Method and Description
  1. String
getContentType()
Returns the content type of the reply.
  1. InputStream
getInputStream()
returns the input stream that is sent to the browser as the reply.
  1. String
toString()
Returns a string representation of this event.
  1. void
write(PkEventFormatter formatter,OutputStream outputStream)
Streams out this event to the outputStream using the formatter.
Methods inherited from class com.ibm.security.certclient.base.PkRepEvent
getReq
Methods inherited from class com.ibm.security.certclient.base.PkEvent
getMsg
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PkHttpRepEvent

  1. public PkHttpRepEvent(Object source,
  2. Object msg,
  3. PkReqEvent req,
  4. String contentType,
  5. InputStream inputStream)
Constructs a PkHttpRepEvent.
Parameters:
source - The object that constructs the event. Usually, but not necessarily, the source is an instance of a subclass of * PkActiveSource.
msg - The message that was parsed in order to create this event. msg may be null when the event is not built from a message. The class of msg depends on the PkEventFormatter used to create this event.
req - The request object that caused the creation of this reply. If the reply event is not built as a result of processing a request, then req can be null.
contentType - The content type of the reply sent to the browser.
inputStream - The stream that is sent to the browser.

PkHttpRepEvent

  1. public PkHttpRepEvent(Object source,
  2. Object msg,
  3. PkReqEvent req,
  4. String contentType,
  5. byte[] reply)
Constructs a PkHttpRepEvent.
Parameters:
source - The object that constructs the event. Usually, but not necessarily, the source is an instance of a subclass of * PkActiveSource.
msg - The message that was parsed in order to create this event. msg may be null when the event is not built from a message. The class of msg depends on the PkEventFormatter used to create this event.
req - The request object that caused the creation of this reply. If the reply event is not built as a result of processing a request, then req can be null.
contentType - The content type of the reply sent to the browser.
reply - The array of bytes that is sent to the browser.

PkHttpRepEvent

  1. public PkHttpRepEvent(Object source,
  2. Object msg,
  3. PkReqEvent req,
  4. String contentType,
  5. String reply)
Constructs a PkHttpRepEvent.
Parameters:
source - The object that constructs the event. Usually, but not necessarily, the source is an instance of a subclass of * PkActiveSource.
msg - The message that was parsed in order to create this event. msg may be null when the event is not built from a message. The class of msg depends on the PkEventFormatter used to create this event.
req - The request object that caused the creation of this reply. If the reply event is not built as a result of processing a request, then req can be null.
contentType - The content type of the reply sent to the browser.
reply - The string that is sent to the browser.

Method Detail

getContentType

  1. public String getContentType()
Returns the content type of the reply.

getInputStream

  1. public InputStream getInputStream( )
returns the input stream that is sent to the browser as the reply.

write

  1. public void write(PkEventFormatter formatter,
  2. OutputStream outputStream)
  3. throws IOException
  4. PkException
Streams out this event to the outputStream using the formatter.
Specified by:
write in class PkEvent
Parameters:
formatter - The PkEventFormatter that will write the event.
outputStream - The OuputStream where the formatter will write the event.
Throws:
IOException - if the write operation fails for any reason.

toString

  1. public String toString()
Returns a string representation of this event.
Overrides:
toString in class PkEvent