|
webMethods Admin Version 7.1.0.0.211 082207 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCOM.activesw.api.client.BrokerConnectionDescriptor
public class BrokerConnectionDescriptor
This class provides a way to configure the connection which a BrokerClient object uses.
Connection Sharing: A BrokerClient object created with connection sharing set to true will allow its connection to the broker to be re-used by other BrokerClient objects in order to increase performance. When set to false, the network connection used by the client will never be shared. Automatic Reconnect: A BrokerClient object created with automatic reconnect set to true will attempt to reconnect to the broker if at any time it finds that its connection to the broker has been lost. If its client does not exist, then a new one will get created. Explicitly calling disconnect() or destroy() on a client disables this feature. State Sharing: A BrokerClient object created with state sharing set to true will allow other BrokerClient objects to use reconnect to open sessions with the client's state on the broker. All BrokerClients which are sharing the client's state will affect one another. This feature should be used with care. A value of false, is the default, and causes the Broker to only allow one session to use the client's state at a time. This quality only applies to making a new client. It is completely ignored when reconnecting clients. Shared Event Ordering: A BrokerClient object created with state sharing set to true and with enforced event order set to SHARED_ORDER_BY_PUBLISHER, will enforce that the events delivered to the clients are ordered so that no event from a publisher is processed until its preceding events are processed. If enforced event order is set to SHARED_ORDER_NONE, then no ordering is imposed on the events delivered to the clients. This feature should be used with care because it can cause a client's events to be processed out of order. A value of SHARED_ORDER_BY_PUBLISHER, is the default. This quality only applies to making a new client. It is completely ignored when reconnecting clients, or when creating clients which do not have state sharing enabled. Secure Socket Certificate: Secure socket layer (SSL) support requires a certificate file in order to validate the digital certificates. SSL is enabled whenever the certifcate file is not null. In addition, a certificate in the file can be specified using the distinguished name. If the distinguished name is null, then the client connects annonymously. If it is non-null, then the digital certificate for that name is used. If it is USE_DEFAULT_DN, then the default name in the certificate file is used. Access Label Hint: When using the access label feature, this allows a client to specify a hint string to be used to look up the client's access label. Access labels are only looked up when creating a client, so the hint is ignored when reconnecting. Forced Reconnect: A BrokerClient object created with forced reconnect set to true can be forcefully reconnected to. This will reconnect to the client and possibly disconnect the existing connected session. Forced reconnect cannot be used in conjunction with shared state. A value of false is the default. Redelivery Count: A BrokerClient object created with redelivery count set to true will have delivery counts tracked for it by the Broker. Redelivery counts can be incremented automatically or manually. A value of false for redelivery count is the default. If turned on, manual increments are the default. Keep Alive settings: KeepAlive settings are pertinent to the network connection that is created on behalf of BrokerClient object. In case of State Sharing Clients KeepAlive settings might be different for different sessions of the client. Keep Alive settings are important for network connection sharing, connections with different Keep Alive settings can not be shared. KeepAlive settings are comprised from 3 attributes:
Field Summary | |
---|---|
static BrokerConnectionDescriptor |
defaultDescriptor
|
static int |
ENCRYPT_LEVEL_NO_ENCRYPTION
|
static int |
ENCRYPT_LEVEL_US_DOMESTIC
|
static int |
ENCRYPT_LEVEL_US_EXPORT
|
static java.lang.String |
SHARED_ORDER_BY_PUBLISHER
|
static java.lang.String |
SHARED_ORDER_NONE
|
static java.lang.String |
USE_DEFAULT_DN
|
Constructor Summary | |
---|---|
BrokerConnectionDescriptor()
Create an empty connection descriptor. |
|
BrokerConnectionDescriptor(BrokerConnectionDescriptor desc)
Copy constructor |
Method Summary | |
---|---|
boolean |
equals(BrokerConnectionDescriptor desc)
|
java.lang.String |
getAccessLabelHint()
Get the access label hint. |
boolean |
getAckVolatile()
Internal use only. |
boolean |
getAutomaticReconnect()
Get the automatic reconnect status of the descriptor. |
boolean |
getAutomaticRedeliveryCount()
Get the redelivery_count_auto status of the descriptor. |
int |
getClientLifeCycle()
Internal use only. |
int |
getClientStorage()
Internal use only. |
boolean |
getConnectionShare()
Get the connection share status of the descriptor. |
int |
getConnectionShareLimit()
Get the maximum number of clients that may share the connection. |
boolean |
getForcedReconnect()
Get the forced_reconnect status of the descriptor. |
int |
getKeepAlivePeriod()
Get the Keep Alive Period of the descriptor. |
int |
getKeepAliveRetryCount()
Get the Keep Alive Retry Count of the descriptor. |
java.util.Locale |
getLocale()
Get the locale for this connection. |
int |
getMaxResponseTime()
Get the Max Response Time of the descriptor. |
boolean |
getPriorityOrdering()
Get the event priority ordering status of the descriptor. |
boolean |
getRedeliveryCountEnabled()
Get the redelivery_count status of the descriptor. |
java.lang.String |
getSharedEventOrdering()
Get the shared event ordering status of the descriptor. |
static BrokerSSLCertificate |
getSSLCertificate(java.lang.String certificate_file,
java.lang.String trust_file,
COM.activesw.api.client.enums.KeystoreType keystore_type,
COM.activesw.api.client.enums.TruststoreType truststore_type,
java.lang.String password)
Get the SSL certificate for a specific distinguished name from a certificate file. |
static BrokerSSLCertificate |
getSSLCertificate(java.lang.String certificate_file,
java.lang.String password,
java.lang.String distinguished_name)
Get the SSL certificate for a specific distinguished name from a certificate file. |
static java.lang.String[] |
getSSLCertificateDns(java.lang.String certificate_file,
java.lang.String password)
Get the list of distinguished names from a certificate file. |
static java.lang.String[] |
getSSLCertificateDns(java.lang.String certificate_file,
java.lang.String trust_file,
COM.activesw.api.client.enums.KeystoreType keystore_type,
COM.activesw.api.client.enums.TruststoreType truststore_type,
java.lang.String password)
Get the list of distinguished names from a certificate file. |
java.lang.String |
getSSLCertificateFile()
Deprecated. Get the secure socket layer (SSL) certificate file. |
java.lang.String |
getSSLDistinguishedName()
Get the secure socket layer (SSL) distinguished name. |
boolean |
getSSLEncrypted()
Get the secure socket layer encryption flag. |
static int |
getSSLEncryptionLevel()
Get the SSL encryption level that this library is capable of. |
java.lang.String |
getSSLKeystore()
|
COM.activesw.api.client.enums.KeystoreType |
getSSLKeystoreType()
|
static java.lang.String[] |
getSSLRootDns(java.lang.String keystore,
java.lang.String truststore,
COM.activesw.api.client.enums.KeystoreType keystore_type,
COM.activesw.api.client.enums.TruststoreType truststore_type,
java.lang.String password)
Get the list of trusted root distinguished names from a certificate file. |
java.lang.String |
getSSLTruststore()
|
COM.activesw.api.client.enums.TruststoreType |
getSSLTruststoreType()
|
boolean |
getStateShare()
Get the state share status of the descriptor. |
void |
setAccessLabelHint(java.lang.String hint)
Set the access label hint. |
void |
setAckVolatile(boolean on)
Internal use only. |
void |
setAutomaticReconnect(boolean reconnect)
Set the automatic reconnect status of the descriptor. |
void |
setAutomaticRedeliveryCount(boolean on)
Set the redelivery_count_auto status of the descriptor. |
void |
setClientLifeCycle(int l)
Internal use only. |
void |
setClientStorage(int s)
Internal use only. |
void |
setConnectionShare(boolean shared)
Set the connection share status of the descriptor. |
void |
setConnectionShareLimit(int limit)
Set the maximum number of clients that may share the connection. |
void |
setForcedReconnect(boolean forced)
Set the forced reconnect status of the descriptor. |
void |
setKeepAlive(int KeepAlivePeriod,
int MaxResponseTime,
int RetryCount)
Set the Keep Alive settings on the descriptor |
void |
setLocale(java.util.Locale locale)
Set the locale for this connection. |
void |
setPriorityOrdering(boolean new_value)
Set the event priority ordering status of the descriptor. |
void |
setRedeliveryCountEnabled(boolean on)
Set the redelivery_count status of the descriptor. |
void |
setSharedEventOrdering(java.lang.String ordering)
Set the shared event ordering status of the descriptor. |
void |
setSSLCertificate(java.lang.String keystore,
java.lang.String truststore,
COM.activesw.api.client.enums.KeystoreType keystore_type,
COM.activesw.api.client.enums.TruststoreType truststore_type,
java.lang.String password)
|
void |
setSSLDistinguishedName(java.lang.String dn)
|
void |
setSSLEncrypted(boolean encrypted)
Set the secure socket layer encryption flag. |
void |
setStateShare(boolean shared)
Set the state share status of the descriptor. |
java.lang.String |
toString()
Return a human-readable string with the descriptor's value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String USE_DEFAULT_DN
public static final int ENCRYPT_LEVEL_NO_ENCRYPTION
public static final int ENCRYPT_LEVEL_US_EXPORT
public static final int ENCRYPT_LEVEL_US_DOMESTIC
public static final java.lang.String SHARED_ORDER_NONE
public static final java.lang.String SHARED_ORDER_BY_PUBLISHER
public static final BrokerConnectionDescriptor defaultDescriptor
Constructor Detail |
---|
public BrokerConnectionDescriptor()
public BrokerConnectionDescriptor(BrokerConnectionDescriptor desc)
Method Detail |
---|
public boolean equals(BrokerConnectionDescriptor desc)
public boolean getConnectionShare()
public void setConnectionShare(boolean shared)
public int getConnectionShareLimit()
public void setConnectionShareLimit(int limit)
java.lang.IllegalArgumentException
- if limit < 2public boolean getAutomaticReconnect()
public void setAutomaticReconnect(boolean reconnect)
public boolean getStateShare()
public void setStateShare(boolean shared)
public java.lang.String getSharedEventOrdering()
public void setSharedEventOrdering(java.lang.String ordering) throws BrokerException
BrokerNullParameterException
- If ordering is null.
BrokerOutOfRangeException
- If odering contains spaces or
unprintable characters.
BrokerException
public java.lang.String getSSLCertificateFile()
public java.lang.String getSSLKeystore()
public java.lang.String getSSLTruststore()
public COM.activesw.api.client.enums.TruststoreType getSSLTruststoreType()
public COM.activesw.api.client.enums.KeystoreType getSSLKeystoreType()
public java.lang.String getSSLDistinguishedName()
public void setSSLDistinguishedName(java.lang.String dn)
public void setSSLCertificate(java.lang.String keystore, java.lang.String truststore, COM.activesw.api.client.enums.KeystoreType keystore_type, COM.activesw.api.client.enums.TruststoreType truststore_type, java.lang.String password) throws BrokerException
keystore
- truststore
- keystore_type
- truststore_type
- password
-
BrokerException
public boolean getSSLEncrypted()
public void setSSLEncrypted(boolean encrypted)
public java.lang.String getAccessLabelHint()
public void setAccessLabelHint(java.lang.String hint)
public static int getSSLEncryptionLevel()
public static java.lang.String[] getSSLCertificateDns(java.lang.String certificate_file, java.lang.String password) throws BrokerException
BrokerFileNotFoundException
- If the certificate file is not
found or readable.
BrokerNoPermissionException
- If the password is not valid or
if the file is not a certificate file.
BrokerNullParameterException
- If the cetificate_file or
password are null.
BrokerSecurityException
- If SSL support is not available.
BrokerException
public static java.lang.String[] getSSLCertificateDns(java.lang.String certificate_file, java.lang.String trust_file, COM.activesw.api.client.enums.KeystoreType keystore_type, COM.activesw.api.client.enums.TruststoreType truststore_type, java.lang.String password) throws BrokerException
certificate_file
- trust_file
- keystore_type
- truststore_type
- password
-
BrokerException
public static java.lang.String[] getSSLRootDns(java.lang.String keystore, java.lang.String truststore, COM.activesw.api.client.enums.KeystoreType keystore_type, COM.activesw.api.client.enums.TruststoreType truststore_type, java.lang.String password) throws BrokerException
keystore
- keystore filetruststore
- truststore filekeystore_type
- keystore typetruststore_type
- truststore typepassword
- password
BrokerException
public static BrokerSSLCertificate getSSLCertificate(java.lang.String certificate_file, java.lang.String password, java.lang.String distinguished_name) throws BrokerException
BrokerFileNotFoundException
- If the certificate file is not
found or readable.
BrokerNoPermissionException
- If the password is not valid or
if the file is not a certificate file.
BrokerNullParameterException
- If the cetificate_file,
password, or distinguished_name are null.
BrokerSecurityException
- If SSL support is not available.
BrokerUnknownNameException
- If a distinguished name is
specified but does not exist in the certificate file.
BrokerException
public static BrokerSSLCertificate getSSLCertificate(java.lang.String certificate_file, java.lang.String trust_file, COM.activesw.api.client.enums.KeystoreType keystore_type, COM.activesw.api.client.enums.TruststoreType truststore_type, java.lang.String password) throws BrokerException
BrokerFileNotFoundException
- If the certificate file is not
found or readable.
BrokerNoPermissionException
- If the password is not valid or
if the file is not a certificate file.
BrokerNullParameterException
- If the cetificate_file,
password, or distinguished_name are null.
BrokerSecurityException
- If SSL support is not available.
BrokerUnknownNameException
- If a distinguished name is
specified but does not exist in the certificate file.
BrokerException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean getForcedReconnect()
public void setForcedReconnect(boolean forced)
public boolean getRedeliveryCountEnabled()
public void setRedeliveryCountEnabled(boolean on)
public boolean getAutomaticRedeliveryCount()
public void setAutomaticRedeliveryCount(boolean on)
public int getKeepAlivePeriod()
public int getMaxResponseTime()
public int getKeepAliveRetryCount()
public boolean getAckVolatile()
public void setAckVolatile(boolean on)
public void setKeepAlive(int KeepAlivePeriod, int MaxResponseTime, int RetryCount) throws BrokerOutOfRangeException
KeepAlivePeriod
- - valid range from 1 to Integer.MAX_VALUEMaxResponseTime
- - valid range from 1 to KeepAlivePeriodRetryCount
- - valid range from 1 to Integer.MAX_VALUE
BrokerOutOfRangeException
- If parameters do not fall within specified rangepublic void setLocale(java.util.Locale locale)
null
will set the connection's locale to that of the Broker's.
locale
- The locale for this connection.public java.util.Locale getLocale()
public int getClientStorage()
public void setClientStorage(int s)
public int getClientLifeCycle()
public void setClientLifeCycle(int l)
public boolean getPriorityOrdering()
public void setPriorityOrdering(boolean new_value)
|
webMethods Admin Version 7.1.0.0.211 082207 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |