java.lang.Cloneable
public final class WSConfig
extends java.lang.Object
implements java.lang.Cloneable
Constructor | Description |
---|---|
WSConfig() |
Create a warm standby configuration instance without a specified name.
|
WSConfig(java.lang.String name) |
Create a warm standby configuration instance with a specified name.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
clone() |
|
boolean |
equals(java.lang.Object o) |
|
boolean |
equalsIgnoreName(WSConfig wsConfig) |
Compares with other configurations ignoring its names.
|
static boolean |
equalsIgnoreName(WSConfig wsConfig1,
WSConfig wsConfig2) |
Compares two configurations ignoring its names.
|
int |
getBackupDelay() |
Gets the backup delay that is applied after failure of the first
reconnection attempt and before switching to backup endpoint.
|
java.util.List<Endpoint> |
getEndpoints() |
Gets list of endpoints.
|
java.lang.String |
getName() |
Gets name.
|
int |
getReconnectionRandomDelayRange() |
Gets the random delay range before reconnection to the last opened
endpoint in case of disconnection.
|
int[] |
getRetryDelay() |
Gets retry delays that is applied after all endpoints has been checked
unsuccessfully and before next iteration will be started.
|
int |
getRetryDelay(int retryNumber) |
Gets retry delay that is applied after all endpoints has been checked
unsuccessfully and before next iteration will be started.
|
java.lang.Integer |
getTimeout() |
Gets the open timeout that is used for connection to endpoints.
|
int |
hashCode() |
|
WSConfig |
setBackupDelay(int delayMs) |
Sets the backup delay that is applied after failure of the first
reconnection attempt and before switching to backup endpoint.
|
WSConfig |
setEndpoints(Endpoint... value) |
Sets endpoints array.
|
WSConfig |
setEndpoints(java.util.List<? extends Endpoint> value) |
Sets endpoints list.
|
WSConfig |
setEndpointsCollection(java.util.Collection<? extends Endpoint> value) |
Sets endpoints collection.
|
WSConfig |
setReconnectionRandomDelayRange(int delayMs) |
Sets the random delay range before reconnection to the last opened
endpoint in case of disconnection.
|
WSConfig |
setRetryDelay(int... delayMs) |
Sets retry delays that is applied after all endpoints has been checked
unsuccessfully and before next iteration will be started.
|
WSConfig |
setTimeout(java.lang.Integer valueMs) |
Sets the open timeout that is used for connection to the endpoints.
|
java.lang.String |
toString() |
public WSConfig()
public WSConfig(java.lang.String name)
public java.lang.String getName()
public java.util.List<Endpoint> getEndpoints()
Note: if endpoints with same app,host and port occurs multiple times then only first one will be used while opening.
The iteration through endpoints always starts from the begin of the
ednpoint pool.
Endpoint from which channel has been disconnected and endpoints which
have been already checked unsuccessfully after disconnection, are skipped
from the iteration.
If some other order of iteration is desired than in the appropriate event
handler (onChannelDisconnected, onEndpointCheckUnsuccessfully, ..) the
endpoints order in the pool can be changed appropriately.
public WSConfig setEndpointsCollection(java.util.Collection<? extends Endpoint> value)
Note: if endpoints with same app,host and port will be passed multiple times then only first one will be used while opening.
The iteration through endpoints always starts from the begin of the
ednpoint pool.
Endpoint from which channel has been disconnected and endpoints which
have been already checked unsuccessfully after disconnection, are skipped
from the iteration.
If some other order of iteration is desired than in the appropriate event
handler (onChannelDisconnected, onEndpointCheckUnsuccessfully, ..) the
endpoints order in the pool can be changed appropriately.
value
- collection of endpoints.java.lang.IllegalArgumentException
- if null endpoint occurs in the collection.setEndpoints(Endpoint[])
,
setEndpoints(List)
public WSConfig setEndpoints(java.util.List<? extends Endpoint> value)
Note: if endpoints with same app,host and port will be passed multiple times then only first one will be used while opening.
The iteration through endpoints always starts from the begin of the
ednpoint pool.
Endpoint from which channel has been disconnected and endpoints which
have been already checked unsuccessfully after disconnection, are skipped
from the iteration.
If some other order of iteration is desired than in the appropriate event
handler (onChannelDisconnected, onEndpointCheckUnsuccessfully, ..) the
endpoints order in the pool can be changed appropriately.
value
- list of endpoints.java.lang.IllegalArgumentException
- if null endpoint occurs in the list.setEndpoints(Endpoint[])
,
setEndpointsCollection(Collection)
public WSConfig setEndpoints(Endpoint... value)
Note: if endpoints with same app,host and port will be passed multiple times then only first one will be used while opening.
The iteration through endpoints always starts from the begin of the
ednpoint pool.
Endpoint from which channel has been disconnected and endpoints which
have been already checked unsuccessfully after disconnection, are skipped
from the iteration.
If some other order of iteration is desired than in the appropriate event
handler (onChannelDisconnected, onEndpointCheckUnsuccessfully, ..) the
endpoints order in the pool can be changed appropriately.
value
- array of endpoints.java.lang.IllegalArgumentException
- if null endpoint occurs in the array.setEndpoints(List)
,
setEndpointsCollection(Collection)
public int getReconnectionRandomDelayRange()
public WSConfig setReconnectionRandomDelayRange(int delayMs)
delayMs
- new range for random delay in milliseconds.public int getBackupDelay()
public WSConfig setBackupDelay(int delayMs)
delayMs
- new backup delay in milliseconds.java.lang.IllegalArgumentException
- if the argument delayMs is negative.public java.lang.Integer getTimeout()
public WSConfig setTimeout(java.lang.Integer valueMs)
valueMs
- new open timeout in milliseconds.public int getRetryDelay(int retryNumber)
retryNumber
- public int[] getRetryDelay()
The default value is 1000 ms.
public WSConfig setRetryDelay(int... delayMs)
delayMs
- array of delays in milliseconds, if it's null then there is no
any delay.java.lang.IllegalArgumentException
- if the argument delayMs contains negative delay.public boolean equalsIgnoreName(WSConfig wsConfig)
wsConfig
- public static boolean equalsIgnoreName(WSConfig wsConfig1, WSConfig wsConfig2)
wsConfig1
- wsConfig2
- public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.