Interface SessionAttributes
public interface SessionAttributes
Session Attributes.
This encapsulates the basic attributes of a Session
. These attributes
may be set (unless default values are sufficient) on the
SessionFactory
used to create sessions.
- Since:
- 5.0
- Author:
- DiffusionData Limited
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
The transports available to Java clients. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The default connection timeout = 2 seconds.static final int
The default size of socket and message input buffers in bytes.static final int
The default maximum message size in bytes.static final int
The default maximum outbound queue size in messages.static final int
The default size of socket and message output buffers in bytes.static final int
The default reconnection timeout = 60 seconds.static final int
The default recovery buffer size in messages.static final String
The default request path.static final int
The default write timeout for blocking writes = 2 seconds.static final int
The minimum value that the maximum message size can be set to in bytes. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the connection timeout value.Returns the proxy authenticator used to route a connection to the server via an HTTP proxy.Returns the proxy host name used to route a connection to the server via an HTTP proxy.int
Returns the proxy port used to route a connection to the server via an HTTP proxy.Returns the initial retry strategy.int
Returns the input buffer size for socket connection buffers and message receiving buffers.Returns the local socket address.int
Returns the maximum message size that will be accepted by this session.int
Returns the maximum size of the outbound message queue for the connection.int
Returns the output buffer size for socket connection buffers and message sending buffers.Returns the reconnection strategy.int
Returns the reconnection timeout.int
Returns the maximum number of sent messages that can be recovered on reconnection.Returns the transports the session will use to connect to the server.Returns the path used for any HTTP requests made by the session.Returns the host name or IP of the server the session will connect to.int
Returns the port of the server the session will connect to.Returns the URL used to create the session.Returns the SSL context for secure connections.int
Returns the write timeout value.boolean
Indicates whether the session will use transport layer security to connect to Diffusion.
-
Field Details
-
DEFAULT_CONNECTION_TIMEOUT
static final int DEFAULT_CONNECTION_TIMEOUTThe default connection timeout = 2 seconds.- See Also:
-
DEFAULT_RECONNECTION_TIMEOUT
static final int DEFAULT_RECONNECTION_TIMEOUTThe default reconnection timeout = 60 seconds.- Since:
- 5.5
- See Also:
-
DEFAULT_WRITE_TIMEOUT
static final int DEFAULT_WRITE_TIMEOUTThe default write timeout for blocking writes = 2 seconds.- See Also:
-
DEFAULT_MAXIMUM_MESSAGE_SIZE
static final int DEFAULT_MAXIMUM_MESSAGE_SIZEThe default maximum message size in bytes. The maximum message size limits the size of received messages. This default value is isInteger.MAX_VALUE
, so the message size is effectively unlimited.- See Also:
-
MAXIMUM_MESSAGE_SIZE_MIN
static final int MAXIMUM_MESSAGE_SIZE_MINThe minimum value that the maximum message size can be set to in bytes.- See Also:
-
DEFAULT_INPUT_BUFFER_SIZE
static final int DEFAULT_INPUT_BUFFER_SIZEThe default size of socket and message input buffers in bytes.- See Also:
-
DEFAULT_OUTPUT_BUFFER_SIZE
static final int DEFAULT_OUTPUT_BUFFER_SIZEThe default size of socket and message output buffers in bytes.- See Also:
-
DEFAULT_RECOVERY_BUFFER_SIZE
static final int DEFAULT_RECOVERY_BUFFER_SIZEThe default recovery buffer size in messages.- Since:
- 5.8
- See Also:
-
DEFAULT_MAXIMUM_QUEUE_SIZE
static final int DEFAULT_MAXIMUM_QUEUE_SIZEThe default maximum outbound queue size in messages.- Since:
- 5.9
- See Also:
-
DEFAULT_REQUEST_PATH
The default request path.- Since:
- 6.0
- See Also:
-
-
Method Details
-
getServerURL
String getServerURL()Returns the URL used to create the session.- Returns:
- the URL
-
getConnectionTimeout
int getConnectionTimeout()Returns the connection timeout value.- Returns:
- connection timeout in milliseconds
- See Also:
-
getInputBufferSize
int getInputBufferSize()Returns the input buffer size for socket connection buffers and message receiving buffers.- Returns:
- the input buffer size in bytes
- See Also:
-
getOutputBufferSize
int getOutputBufferSize()Returns the output buffer size for socket connection buffers and message sending buffers.- Returns:
- the output buffer size in bytes
- See Also:
-
getWriteTimeout
int getWriteTimeout()Returns the write timeout value.- Returns:
- write timeout in milliseconds
- See Also:
-
getInitialRetryStrategy
RetryStrategy getInitialRetryStrategy()Returns the initial retry strategy.- Returns:
- the initial retry strategy used by the session
- See Also:
-
getReconnectionStrategy
ReconnectionStrategy getReconnectionStrategy()Returns the reconnection strategy.- Returns:
- the reconnection strategy to be used by the session
- Since:
- 5.5
- See Also:
-
getReconnectionTimeout
int getReconnectionTimeout()Returns the reconnection timeout.- Returns:
- the reconnection timeout in milliseconds
- Since:
- 5.5
- See Also:
-
getLocalSocketAddress
SocketAddress getLocalSocketAddress()Returns the local socket address.- Returns:
- the local socket address or null if none has been specified
- See Also:
-
getSslContext
SSLContext getSslContext()Returns the SSL context for secure connections.- Returns:
- the SSL context
- See Also:
-
getMaximumMessageSize
int getMaximumMessageSize()Returns the maximum message size that will be accepted by this session.- Returns:
- the maximum message size
- See Also:
-
getHttpProxyHost
String getHttpProxyHost()Returns the proxy host name used to route a connection to the server via an HTTP proxy.- Returns:
- the proxy host
- Since:
- 5.1
- See Also:
-
getHttpProxyPort
int getHttpProxyPort()Returns the proxy port used to route a connection to the server via an HTTP proxy.- Returns:
- the proxy port
- Since:
- 5.1
- See Also:
-
getHttpProxyAuth
HTTPProxyAuthentication getHttpProxyAuth()Returns the proxy authenticator used to route a connection to the server via an HTTP proxy.- Returns:
- the proxy authenticator
- Since:
- 5.1
- See Also:
-
getServerHost
String getServerHost()Returns the host name or IP of the server the session will connect to.- Returns:
- the host name (or IP address)
- Since:
- 5.8
- See Also:
-
getServerPort
int getServerPort()Returns the port of the server the session will connect to.- Returns:
- the port
- Since:
- 5.8
- See Also:
-
getRequestedTransports
List<SessionAttributes.Transport> getRequestedTransports()Returns the transports the session will use to connect to the server.- Returns:
- the transports in order of preference
- Since:
- 5.8
- See Also:
-
isTransportSecure
boolean isTransportSecure()Indicates whether the session will use transport layer security to connect to Diffusion.- Returns:
- if the session will use TLS
- Since:
- 5.8
- See Also:
-
getRequestPath
String getRequestPath()Returns the path used for any HTTP requests made by the session.- Returns:
- the path used in request URLs
- Since:
- 5.8
- See Also:
-
getRecoveryBufferSize
int getRecoveryBufferSize()Returns the maximum number of sent messages that can be recovered on reconnection.- Returns:
- the size of the buffer used to store sent messages for sessions that support reconnection
- Since:
- 5.8
- See Also:
-
getMaximumQueueSize
int getMaximumQueueSize()Returns the maximum size of the outbound message queue for the connection.- Returns:
- the maximum number of messages that may be queued on the outbound message queue
- Since:
- 5.9
- See Also:
-