com.ibm.security.certclient.base
Class PkHttpRepEvent
- java.lang.Object
java.util.EventObject
com.ibm.security.certclient.base.PkEvent
com.ibm.security.certclient.base.PkRepEvent
com.ibm.security.certclient.base.PkHttpRepEvent
All implemented interfaces:
- public class PkHttpRepEvent
- extends PkRepEvent
Author:
Rod Mancisidor
See Also:
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 |
---|---|
getContentType()
Returns the content type of the reply.
|
|
getInputStream()
returns the input stream that is sent to the browser as the reply.
|
|
toString()
Returns a string representation of this event.
|
|
|
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
- public PkHttpRepEvent(Object source,
- Object msg,
- PkReqEvent req,
- String contentType,
- InputStream inputStream)
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
- public PkHttpRepEvent(Object source,
- Object msg,
- PkReqEvent req,
- String contentType,
- 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
- public PkHttpRepEvent(Object source,
- Object msg,
- PkReqEvent req,
- String contentType,
- 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
- public String getContentType()
Returns the content type of the reply.
getInputStream
- public InputStream getInputStream( )
returns the input stream that is sent to the browser as the reply.
write
- public void write(PkEventFormatter formatter,
- OutputStream outputStream)
- throws IOException
- PkException
Streams out this event to the
outputStream
using the
formatter
.
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
- public String toString()
Returns a string representation of this event.
PkHttpRepEvent
.