|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.cics.server.TcpipRequest
Usage:
This class provides the Java implementation of TCPIP requests related to the following
CICS API commands:
This class acts like a singleton. The constructor is protected and class method getTcpipRequestInstance() has to be used to obtain the TcpipRequest object.
The getCertificateInfo() method returns the full certificate. This is equivalent to CICS API command EXTRACT CERTIFICATE
The setter methods allow instance variables to be set in the TcpipRequest object. These variables relate to the following options on the CICS API command WEB RECEIVE:
By default MAXLENGTH is set to 32K and NOTRUNCATE is not set. These values can be overriden by the setters.
Method getContent() will receive the clients request body. This is equivalent to CICS API command WEB RECEIVE INTO.
Depending on the size of the body sent by the client and the MAXLENGTH value the complete body may not be received. Method isBodyComplete() returns boolean true if the whole body was returned by the getContent() method. If the whole body was not returned by getContent() then isBodyTruncated() returns boolean true unless setNoTruncate() was used to specify NOTRUNCATE. If NOTRUNCATE was specified and the complete body was not returned by getContent() then isBodyPartial() returns boolean true and getContent() can be used to obtain the next portion of the body.
The HTTP body can also be received into a named container by getContentAsCountainer(). If the HTTP body is received into a named container any instance varibales set by the setter methods are ignored with the exception of CHARACTERSET.
The get*() methods return the various CICS API command EXTRACT TCPIP values and the madiatype and characterset of the HTTP body sent be the client.
The isSSL() and isClientAuth() methods return boolean values that can be used to determine the SSLTYPE returned from CICS API command WEB EXTRACT SSLTYPE.
Field Summary | |
---|---|
static int |
AUTOAUTH
|
static int |
AUTOREGISTER
|
static int |
BASICAUTH
|
static int |
CERTIFICAUTH
|
static int |
CLIENTAUTH
|
static int |
NOAUTHENTIC
|
static int |
NOSSL
|
static int |
NOTSET
|
static int |
NOTSUPPORTED
|
static int |
REQUIRED
|
static int |
SSL
|
static int |
SUPPORTED
|
Fields inherited from interface com.ibm.cics.server.TidyUpOnTermination |
---|
COPYRIGHT, SCCSID |
Method Summary | |
---|---|
void |
drive_ibmJVMTidyUp()
Method to drive the static ibmJVMTidyUp method in a non-resettable JVM |
int |
getAuthenticate()
Usage: Returns an integer which indicates the authentication requested for the client using the transaction. |
java.lang.String |
getBodyCharset()
Usage: Returns the HTTP body characterset in which the HTTP body was encoded in by the client. |
CertificateInfo |
getCertificateInfo()
Usage: Returns the owner certificate. |
CertificateInfo |
getCertificateInfo(int ownerIssuer)
Usage: Returns the requested certificate, either the owner or the issuer certificate. |
java.lang.String |
getClientAddress()
Usage: Returns the client's TCPIP address. |
byte[] |
getClientHostAddress()
Usage: Returns the client's TCPIP address in a Jave byte array. |
java.lang.String |
getClientHostName()
Usage: Returns the client's name as known by the Domain Name Server. |
byte[] |
getContent()
Usage: Returns the body of the HTTP request. |
byte[] |
getContent(java.lang.String hostCodePage,
java.lang.String characterset)
Usage: Returns the body of the HTTP request. |
Container |
getContentAsContainer(java.lang.String toContainer)
Usage: Stores the body of the HTTP request in a named container. |
Container |
getContentAsContainer(java.lang.String toContainer,
java.lang.String toChannel)
Usage: Stores the body of the HTTP request in a named container. |
int |
getMaxDataLen()
Usage: Returns an maximum data length value for the socket. |
java.lang.String |
getMediaType()
Usage: Returns the media type of the HTTP body sent by the client. |
int |
getPortNumber()
Usage: Returns the TCPIP port number associated with the transaction. |
int |
getPrivacy()
Usage: Returns an integer which indicates the privacy requested for the client using the transaction. |
java.lang.String |
getServerAddress()
Usage: Returns the server's TCPIP address. |
byte[] |
getServerHostAddress()
Usage: Returns the server's TCPIP address in a Java byte array. |
java.lang.String |
getServerHostName()
Usage: Returns the server's name as known by the Domain Name Server. |
static TcpipRequest |
getTcpipRequestInstance()
Usage: Class method that returns the TcpipRequest object. |
java.lang.String |
getTcpipService()
Usage: Returns the name of the TCPIP service associated with the transaction. |
boolean |
isBodyComplete()
Usage: Returns a boolean which indicates whether the body returned by getContent() method was complete or not. |
boolean |
isBodyPartial()
Usage: Returns a boolean which indicates whether the body returned by getContent() method was a partial body or not. |
boolean |
isBodyTruncated()
Usage: Returns a boolean which indicates whether the body returned by getContent() method was truncated or not. |
boolean |
isClientAuth()
Usage: Returns a boolean which indicates whether the Secure Sockets Layer (SSL) is client authorised or not. |
boolean |
isSSL()
Usage: Returns a boolean which indicates whether the Secure Sockets Layer (SSL) is being used. |
void |
setCharacterset(java.lang.String characterset)
Usage: Sets WEB RECEIVE command option CHARACTERSET. |
void |
setClientCodePage(java.lang.String characterset)
Usage: Sets WEB RECEIVE command option CHARACTERSET. |
void |
setHostCodePage(java.lang.String hostCodePage)
Usage: Sets WEB RECEIVE command option HOSTCODEPAGE. |
void |
setMaxLength(int maxLength)
Usage: Sets WEB RECEIVE command option MAXLENGTH. |
void |
setNoServerConvert()
Usage: Sets WEB RECEIVE command option SERVERCONV to NOSRVCONVERT. |
void |
setNoTruncate()
Usage: Sets WEB RECEIVE command option NOTRUNCATE. |
void |
setServerConvert()
Usage: Sets WEB RECEIVE command option SERVERCONV to SRVCONVERT. |
void |
setTruncate()
Usage: Resets WEB RECEIVE command option NOTRUNCATE. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NOTSET
public static final int SSL
public static final int NOSSL
public static final int CLIENTAUTH
public static final int NOAUTHENTIC
public static final int BASICAUTH
public static final int CERTIFICAUTH
public static final int AUTOREGISTER
public static final int AUTOAUTH
public static final int SUPPORTED
public static final int REQUIRED
public static final int NOTSUPPORTED
Method Detail |
public static TcpipRequest getTcpipRequestInstance()
None
public CertificateInfo getCertificateInfo() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic CertificateInfo getCertificateInfo(int ownerIssuer) throws InvalidRequestException
ownerIssuer
- indicates whether the owner or issuer certificate is required
InvalidRequestException
- a INVREQ condition occurredpublic java.lang.String getClientHostName() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic java.lang.String getServerHostName() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic java.lang.String getClientAddress() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic java.lang.String getServerAddress() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic byte[] getClientHostAddress() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic byte[] getServerHostAddress() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic boolean isSSL() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic boolean isClientAuth() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic java.lang.String getTcpipService() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic int getPortNumber() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic int getAuthenticate() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic int getPrivacy() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic int getMaxDataLen() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic void setServerConvert()
None
public void setNoServerConvert()
None
public void setClientCodePage(java.lang.String characterset)
characterset
- contains the codepage of the HTTP requests body.
None
public void setCharacterset(java.lang.String characterset)
characterset
- contains the codepage of the HTTP requests body.
None
public void setHostCodePage(java.lang.String hostCodePage)
hostCodePage
- contains the codepage that the HTTP requests body will be converted into.
None
public void setNoTruncate()
None
public void setTruncate()
None
public void setMaxLength(int maxLength) throws LengthErrorException
maxLength
- contains the maximum length value
LengthErrorException
- maxLength not greater than 0public byte[] getContent(java.lang.String hostCodePage, java.lang.String characterset) throws InvalidRequestException, RecordNotFoundException, NonHttpDataException
hostCodePage
- is the codepage to be used to convert from the ASCII
codepage in which it was received in, into the EBCDIC codepage in which
CICS will process itcharacterset
- is the codepage in which the HTTP body is encoded
InvalidRequestException
- a INVREQ condition occurred
RecordNotFoundException
- a NOTFND condition occurred
NonHttpDataException
- is present in this class because
HttpRequest subclass extends TcpipRequest
however TcpipRequest will not throw it!public byte[] getContent() throws InvalidRequestException, RecordNotFoundException, NonHttpDataException
InvalidRequestException
- a INVREQ condition occurred
RecordNotFoundException
- a NOTFND condition occurred
NonHttpDataException
- is present in this class because
HttpRequest subclass extends TcpipRequest
however TcpipRequest will not throw it!public Container getContentAsContainer(java.lang.String toContainer, java.lang.String toChannel) throws InvalidRequestException, RecordNotFoundException, ChannelErrorException, ContainerErrorException
toContainer
- is the name if the container into which the HTTP body is to be storedtoChannel
- is the name of the channel that owns the container
InvalidRequestException
- a INVREQ condition occurred
RecordNotFoundException
- a NOTFND condition occurred
ChannelErrorException
- a CHANNELERR condition occurred
ContainerErrorException
- a CONTAINERERR condition occurredpublic Container getContentAsContainer(java.lang.String toContainer) throws InvalidRequestException, RecordNotFoundException, ChannelErrorException, ContainerErrorException
toContainer
- is the name if the container into which the HTTP body is to be stored
InvalidRequestException
- a INVREQ condition occurred
RecordNotFoundException
- a NOTFND condition occurred
ChannelErrorException
- a CHANNELERR condition occurred
ContainerErrorException
- a CONTAINERERR condition occurredpublic boolean isBodyComplete()
None
public boolean isBodyTruncated()
None
public boolean isBodyPartial()
None
public java.lang.String getBodyCharset() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic java.lang.String getMediaType() throws InvalidRequestException
InvalidRequestException
- a INVREQ condition occurredpublic void drive_ibmJVMTidyUp()
drive_ibmJVMTidyUp
in interface TidyUpOnTermination
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |