public abstract class BaseContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
NO_SSL
Constant used to indicate no SSL encryption.
|
static int |
RPC_BIN
Constant used to indicate that data is to be sent to the server using
webMethods binary RPC transport.
|
static int |
RPC_IDAT
Constant used to indicate that data is to be sent to the server using
webMethods IData transport.
|
static int |
RPC_XML
Constant used to indicate that data is to be sent to the server using
webMethods XML transport.
|
static int |
SSL_128
Constant used to indicate 128-bit SSL encryption.
|
static int |
SSL_40
Constant used to indicate 40-bit SSL encryption.
|
Constructor and Description |
---|
BaseContext()
Constructs a BaseContext object and sets it to the binary RPC
transport type.
|
Modifier and Type | Method and Description |
---|---|
static int |
getSSLSupport()
Returns the strength of the encryption key.
|
boolean |
isClusteredEnv()
Indicates whether this object is currently connected to a clustered
environment.
|
boolean |
isConnected()
Indicates whether the context has successfully connected to a server.
|
boolean |
isSecure()
Indicates whether this object is using a secure connection to the server.
|
boolean |
isUseJSSE()
Specifies whether the port is set to use the Java Secure Socket Extension (JSSE) socket
factory for creating outbound HTTPS connections.
|
void |
setAllowRedir(boolean val)
Specifies whether requests from this object can be redirected (that is,
passed to another server in the target server’s cluster).
|
void |
setAuthentication(java.lang.String user,
java.lang.String pass)
Specifies the authentication credentials (user name and password) that
will be used when this object submits a request to the webMethods
Integration Server.
|
void |
setFixedUri(java.lang.String uri)
Specifies the Uniform Resource Identifier (URI) of the CGI script that
must be used to access the webMethods Integration Server (IS).
|
void |
setProxy(java.lang.String host,
java.lang.String user,
java.lang.String pass)
Specifies the HTTP proxy server (if any) that will be used to communicate
with the webMethods Integration Server.
|
void |
setRetryServer(java.lang.String retryServer)
Specifies the retry server.
|
void |
setSecure(boolean sec)
Specifies whether this client will use HTTP or HTTPS to communicate with
the webMethods Integration Server.
|
void |
setSecureProxy(java.lang.String host,
java.lang.String user,
java.lang.String pass)
Specifies the HTTPS proxy server (if any) that will be used to
communicate with the webMethods Integration Server.
|
void |
setSSLCertificates(KeyAndCert kac)
Specifies that Integration Server obtain private keys and certificate
chains from an object in memory.
|
void |
setSSLCertificates(java.lang.String privKey,
java.lang.String[] certs)
Specifies the certificates and keys that will be used to create an SSL
connection.
|
void |
setSSLCertificates(java.lang.String cert,
java.lang.String privKey,
java.lang.String cacert)
Deprecated.
Replaced by
setSSLCertificates(String, String[]) |
void |
setUseJSSE(boolean useJSSE)
Enables or disables the use of the Java Secure Socket
Extension (JSSE) socket factory for creating outbound HTTPS connections.
|
public static final int NO_SSL
SSL_128
,
SSL_40
,
Constant Field Valuespublic static final int SSL_128
SSL_40
,
NO_SSL
,
Constant Field Valuespublic static final int SSL_40
SSL_128
,
NO_SSL
,
Constant Field Valuespublic static final int RPC_BIN
RPC_XML
,
RPC_IDAT
,
Constant Field Valuespublic static final int RPC_XML
RPC_BIN
,
RPC_IDAT
,
Constant Field Valuespublic static final int RPC_IDAT
RPC_BIN
,
RPC_XML
,
Constant Field Valuespublic BaseContext()
public boolean isClusteredEnv()
public void setAllowRedir(boolean val)
val
- A boolean specifying whether redirection is
permitted as follows.
Set val to…
|
To…
|
true | Allow unlimited redirection |
false | Prevent redirection |
public void setRetryServer(java.lang.String retryServer)
retryServer
- A String specifying the retry server in the form:
hostname:portNumber.public void setSecure(boolean sec)
sec
- A boolean that specifies whether the client will
use HTTPS as follows.
Set sec to…
|
To…
|
true | Use HTTPS |
false | Use HTTP |
isSecure()
public boolean isSecure()
setSecure(boolean)
public boolean isConnected()
public void setFixedUri(java.lang.String uri)
uri
- A String that specifies the URI of the CGI script.public void setProxy(java.lang.String host, java.lang.String user, java.lang.String pass)
Note: User name and password are optional and can be null.
host
- A String that specifies the HTTP proxy in the form:
hostname:portNumber.user
- A String specifying the user name that this object
will use to access the proxy server.pass
- A String specifying the password that this object
will use to access the proxy server.setSecureProxy(java.lang.String, java.lang.String, java.lang.String)
public void setSecureProxy(java.lang.String host, java.lang.String user, java.lang.String pass)
Note: User name and password are optional and can be null.
host
- A String that specifies the HTTPS proxy in the
form: hostname:portNumber.user
- A String specifying the user name that this object
will use to access the proxy server.pass
- A String specifying the password that this object
will use to access the proxy server.setProxy(java.lang.String, java.lang.String, java.lang.String)
public void setAuthentication(java.lang.String user, java.lang.String pass)
user
- A String specifying the user name.pass
- A String specifying the user password.public void setSSLCertificates(java.lang.String cert, java.lang.String privKey, java.lang.String cacert)
setSSLCertificates(String, String[])
cert
- A String specifying the location of the client's
certificate.privKey
- A String specifying the location of the client's
private key.cacert
- A String specifying the location of the Certificate
Authority (CA) that signed the client's certificate.public void setSSLCertificates(java.lang.String privKey, java.lang.String[] certs)
privKey
- A String specifying the location of the private key
that corresponds to the public key in your certificate.certs
- A String [] specifying the locations of all the
certificates in your certificate chain. Your certificate must
appear as the first element in this array. For example if you
own a certificate that has been signed by XYZ' Authority which
in turn was signed by Verisign's Authority, your certificate
chain is comprised of three certificates: your certificate,
XYZ's certificate, and Verisign's certificate. In certs,
these must appear in the following order:
public void setSSLCertificates(KeyAndCert kac)
You can create a KeyAndCert object as follows:
new KeyAndCert(X509Certificate[] cc, PrivateKey pk);
Make sure to include enttoolkit.jar in the client classpath.
kac
- a KeyAndCert object that represents a key and certificate chainpublic static int getSSLSupport()
public boolean isUseJSSE()
public void setUseJSSE(boolean useJSSE)
useJSSE
- Specify true if the connection requires the use of TLS 1.1 or TLS 1.2.
When set to true, Integration Server creates the connection using
the Java Secure Socket Extension (JSSE) socket factory.
Specify false if the connection does not require use of TLS 1.1 or TLS 1.2.
When set to false, the connection supports only SSL 3.0 and TLS 1.0.
This is the default.