|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.aselect.system.communication.server.TCPProtocolResponse
public class TCPProtocolResponse
Wrapper to add data and headers to an outgoing Socket response.
Description:
Protocol information (e.g. headers) can be set by calling the
setProperty() method. The properties are placed in a
Hashtable. When the getOutputStream() method
is called the headers will first be written to the OutputStream
of the socket.
The TCPProtocolResponse can also be used in the
Communicatorand message creator objects (
IMessageCreatorInterface).
Concurrency issues:
Every reponse should have its own TCPProtocolResponse
instance.
| Constructor Summary | |
|---|---|
TCPProtocolResponse(java.net.Socket oResponseSocket,
java.lang.String sProtocolName)
Create a new instance. |
|
| Method Summary | |
|---|---|
java.io.OutputStream |
getOutputStream()
Get the ouput stream to the response message. |
void |
setProperty(java.lang.String sName,
java.lang.String sValue)
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 |
|---|
public TCPProtocolResponse(java.net.Socket oResponseSocket,
java.lang.String sProtocolName)
sProtocolName and the given
socket.
oResponseSocket should be connected to a server of
some kind.sProtocolName should be a valid protocol name e.g.
HTTP1/1.
oResponseSocket - The Socket with the outgoing response.sProtocolName - The protocol name that will be contained in the first line
(response code) of the outgoing response| Method Detail |
|---|
public void setProperty(java.lang.String sName,
java.lang.String sValue)
setProperty in interface IProtocolResponsesName - the name of the property that has to be set.sValue - the value that has to be set.IProtocolResponse.setProperty(java.lang.String,
java.lang.String)
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in interface IProtocolResponseOutputStream to which the response
message can be send.
java.io.IOException - if OutputStream can't be
retrieved from the protocolIProtocolResponse.getOutputStream()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||