The classic client API will be removed in a future release.
@Deprecated public interface ServerDetails
It is possible to specify a Proxy Connector which can allow for connection via some form of Proxy.
Server Details objects are created using
ConnectionFactory.createServerDetails(String)
.
Modifier and Type | Method and Description |
---|---|
long |
getConnectionTimeout()
Deprecated.
Returns the connection timeout.
|
Credentials |
getCredentials()
Deprecated.
Returns the Credentials to use when connecting to the server.
|
String |
getHost()
Deprecated.
Returns the server host.
|
int |
getInputBufferSize()
Deprecated.
Returns the input buffer size for socket connection buffers and
message receiving buffers.
|
SocketAddress |
getLocalSocketAddress()
Deprecated.
Get the optional local socket address, used prior to connection.
|
int |
getOutputBufferSize()
Deprecated.
Returns the output buffer size for socket connection buffers and
message sending buffers.
|
int |
getPort()
Deprecated.
Returns the server port.
|
TransportProtocol |
getProtocol()
Deprecated.
Returns the transport protocol.
|
ProxyConnector |
getProxyConnector()
Deprecated.
Returns the Proxy Connector.
|
SSLContext |
getSSLContext()
Deprecated.
Returns the SSL Context (if set).
|
TopicSet |
getTopics()
Deprecated.
Returns the default list of Topics to subscribe to on connection.
|
long |
getWriteTimeout()
Deprecated.
Returns the write timeout value.
|
boolean |
isAutoAcknowledging()
Deprecated.
Indicates whether the Connection is set to automatically
acknowledge inbound Messages that require acknowledgement.
|
boolean |
isSecureConnection()
Deprecated.
Indicates whether the connection will use SSL.
|
void |
setAutoAcknowledging(boolean autoAcknowledge)
Deprecated.
This allows auto acknowledgement of Messages to be set for a Connection.
|
void |
setConnectionTimeout(long timeout)
Deprecated.
Sets the connection timeout.
|
void |
setCredentials(Credentials credentials)
Deprecated.
Sets Credentials to be used when connecting to the server.
|
void |
setInputBufferSize(int inputBufferSize)
Deprecated.
Sets the input buffer size for socket connection buffers.
|
void |
setLocalSocketAddress(SocketAddress socketAddress)
Deprecated.
Set the optional local socket address, used prior to connection
|
void |
setOutputBufferSize(int outputBufferSize)
Deprecated.
Sets the output buffer size for socket connection buffers.
|
void |
setProxyConnector(ProxyConnector proxyConnector)
Deprecated.
Sets a Proxy Connector to allow for connection via a Proxy Server.
|
void |
setSSLContext(SSLContext context)
Deprecated.
Sets SSL Context to use for SSL Socket creation.
|
void |
setTopics(String... topics)
Deprecated.
Sets the default Topic(s) to be subscribed to on connection.
|
void |
setTopics(TopicSet topics)
Deprecated.
Sets the Topic(s) to be subscribed to on connection.
|
void |
setWriteTimeout(long timeout)
Deprecated.
Set the write timeout value for blocking writes on the connection.
|
TransportProtocol getProtocol()
void setOutputBufferSize(int outputBufferSize)
outputBufferSize
- the buffer size to set.int getOutputBufferSize()
getInputBufferSize()
to the same reasonable size
will result in higher network throughput. The cost of the sending buffer
is only incurred when actually queuing data for output. The cost of the
socket buffer is always incurred and may be modified by the operating system.
By default this is 128KiB.
void setInputBufferSize(int inputBufferSize)
inputBufferSize
- the buffer size to set.int getInputBufferSize()
getOutputBufferSize()
to the same reasonable size
will result in higher network throughput. The cost of the receiving buffer
is only incurred when actually reading data for processing. The cost of the
socket buffer is always incurred and may be modified by the operating system.
By default this is 128KiB.
void setConnectionTimeout(long timeout)
This may be used to override the value set in
ConnectionDetails
.
timeout
- the timeout in milliseconds.long getConnectionTimeout()
void setWriteTimeout(long timeout) throws APIException
Blocking writes are only used for the initial connection request. If it is not possible to complete the write within this time, the connection is closed.
If not explicitly set then the value as obtained from
TimeoutsConfig.getWriteTimeout()
is used.
timeout
- in milliseconds - must be positive. If this exceeds one
hour (3600000ms) a warning will be logged and the time-out will be
set to one hour.APIException
- if timeout value invalid.long getWriteTimeout()
String getHost()
int getPort()
void setProxyConnector(ProxyConnector proxyConnector)
proxyConnector
- the Proxy Connector to setProxyConnector getProxyConnector()
SSLContext getSSLContext()
void setSSLContext(SSLContext context)
If this is not set then the default context is used.
context
- the SSL context.void setCredentials(Credentials credentials)
credentials
- the credentials value. Null may be supplied to
remove credentials.Credentials getCredentials()
void setTopics(TopicSet topics)
If not explicitly set then no Topics are subscribed to by default on connection.
topics
- the Topics to use by default or null to indicate that no
Topics are to be subscribed to on connection (the default).void setTopics(String... topics)
This is a convenience method equivalent to calling
setTopics(TopicSet)
with a TopicSet
constructed
with one or more Topic
names and/or patterns).
topics
- one or more Topic names or selection patterns.TopicSet getTopics()
setTopics(TopicSet)
void setAutoAcknowledging(boolean autoAcknowledge)
By default, when a Message is received on the
listener
that is pending
acknowledgement
then it must be acknowledged using the
ServerConnection.acknowledge(TopicMessage)
method. However, by
setting auto acknowledging on then all such inbound messages will be
automatically acknowledged on arrival.
autoAcknowledge
- true to set auto acknowledgment onboolean isAutoAcknowledging()
boolean isSecureConnection()
SocketAddress getLocalSocketAddress()
void setLocalSocketAddress(SocketAddress socketAddress)
socketAddress
- the socket addressCopyright © 2016 Push Technology Ltd. All Rights Reserved.