|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.aselect.system.communication.server.TCPProtocolRequest
public class TCPProtocolRequest
Wrapper to communicate transparent to an incoming Socket request.
Description:
The TCPProtocolRequest reads headers and other information
from an input stream and places this information in a Hashtable. The headers
can be retrieved by calling the getProperty() method.
The TCPProtocolRequest can be used in the
Communicator and Message creators. The getProtocolName()
method can be used to switch between SOAP12 communication, currently used raw
communication, or other protocols that use TCP as a underlying transport
protocol.
Concurrency issues:
Every request should have its own TCPProtocolRequest instance.
| Constructor Summary | |
|---|---|
TCPProtocolRequest(java.net.Socket oRequestSocket)
Create a new instance. |
|
| Method Summary | |
|---|---|
java.io.InputStream |
getInputStream()
Get the input stream to the request after stripping the headers. |
java.lang.String |
getMessage()
Get the request data. |
java.lang.String |
getProperty(java.lang.String sName)
Retrieve a property of the request. |
java.lang.String |
getProtocolName()
Retrieve the name of the protocol. |
java.lang.String |
getTarget()
Retrieve the full local address with port. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TCPProtocolRequest(java.net.Socket oRequestSocket)
throws java.io.IOException
oRequestSocket. All protocol
data (e.g. headers) is extracted from the socket and buffered. oRequestSocket should be connected to a server of some
kind. Request data should be available. Socket the remaining data
(if available) is the actual request data.
oRequestSocket - The Socket with the incoming request.
java.io.IOException - If reading from the socket fails.| Method Detail |
|---|
public java.lang.String getProtocolName()
getProtocolName in interface IProtocolRequestIProtocolRequest.getProtocolName()public java.lang.String getProperty(java.lang.String sName)
getProperty in interface IProtocolRequestsName - The property name.
IProtocolRequest.getProperty(java.lang.String)public java.lang.String getTarget()
getTarget in interface IProtocolRequestIProtocolRequest.getTarget()
public java.io.InputStream getInputStream()
throws java.io.IOException
ByteArrayInputStream. The
alternative StringBufferInputStream is deprecated:
StringReader class.
StringReader is not an
InputStream,ByteArrayInputStream is used.
getInputStream in interface IProtocolRequestInputStream from which the incomming message can
be retrieved.
java.io.IOException - if InputStream
can't be retrieved from the protocol.IProtocolRequest.getInputStream(),
ByteArrayInputStreampublic java.lang.String getMessage()
getMessage in interface IProtocolRequestIProtocolRequest.getMessage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||