public static class ConnectionSpec.RefImpl extends Object implements ConnectionSpec
ConnectionSpec
.
This implementation is a read/write implementation providing no default values of any kind. It can be used as is and initialized as required, or (as it is intended) it will provide support for various connection profiles (e.g. server connectors), etc.
ConnectionSpec.RefImpl
Constructor and Description |
---|
RefImpl() |
public final InetAddress getAddress()
getAddress
in interface ConnectionSpec
public final byte[] getCredentials()
getCredentials
in interface ConnectionSpec
Command#AUTH
public final int getDatabase()
getDatabase
in interface ConnectionSpec
Command#SELECT
public final int getPort()
getPort
in interface ConnectionSpec
public final Connection.Modality getModality()
getModality
in interface ConnectionSpec
Connection.Modality
of this protocol handler.public final int getMaxConnectWait()
getMaxConnectWait
in interface ConnectionSpec
public final int getReconnectCnt()
getReconnectCnt
in interface ConnectionSpec
public final boolean getSocketFlag(Connection.Socket.Flag flag)
ConnectionSpec
SocketFlag
for the ConnectionSpec
getSocketFlag
in interface ConnectionSpec
SocketFlag
public final Integer getSocketProperty(Connection.Socket.Property property)
ConnectionSpec
Connection.Socket.Property
for the ConnectionSpec
getSocketProperty
in interface ConnectionSpec
SocketFlag
public final Object getConnectionProperty(Connection.Property prop)
getConnectionProperty
in interface ConnectionSpec
public final ConnectionSpec setAddress(InetAddress address)
setAddress
in interface ConnectionSpec
ConnectionSpec
public final ConnectionSpec setPort(int port)
setPort
in interface ConnectionSpec
ConnectionSpec
public final ConnectionSpec setCredentials(byte[] credentials)
ConnectionSpec
setCredentials
in interface ConnectionSpec
ConnectionSpec
ConnectionSpec.setCredentials(String)
public final ConnectionSpec setCredentials(String credentials)
ConnectionSpec
setCredentials
in interface ConnectionSpec
ConnectionSpec
ConnectionSpec.setCredentials(byte[])
public final ConnectionSpec setDatabase(int database)
setDatabase
in interface ConnectionSpec
ConnectionSpec
public final ConnectionSpec setReconnectCnt(int reconnectCnt)
setReconnectCnt
in interface ConnectionSpec
ConnectionSpec
public final ConnectionSpec setConnectionProperty(Connection.Property prop, Object value)
setConnectionProperty
in interface ConnectionSpec
public final ConnectionSpec setModality(Connection.Modality modality)
setModality
in interface ConnectionSpec
ConnectionSpec
public final ConnectionSpec setMaxConnectWait(int cnt)
setMaxConnectWait
in interface ConnectionSpec
ConnectionSpec
public final ConnectionSpec setSocketFlag(Connection.Socket.Flag flag, Boolean value)
ConnectionSpec
Connection.Socket.Flag
for the ConnectionSpec
setSocketFlag
in interface ConnectionSpec
ConnectionSpec
thispublic final ConnectionSpec setSocketProperty(Connection.Socket.Property property, Integer value)
ConnectionSpec
SocketProperty
for the ConnectionSpec
setSocketProperty
in interface ConnectionSpec
Map.put(Object, Object)
semantics.public final boolean getConnectionFlag(Connection.Flag flag)
getConnectionFlag
in interface ConnectionSpec
Connection.Flag
SocketFlag
public final ConnectionSpec setConnectionFlag(Connection.Flag flag, Boolean value)
ConnectionSpec
Connection.Flag
setConnectionFlag
in interface ConnectionSpec
ConnectionSpec
public final int getHeartbeat()
getHeartbeat
in interface ConnectionSpec
public final ConnectionSpec setHeartbeat(int seconds)
setHeartbeat
in interface ConnectionSpec
seconds
- heartbeat periodConnectionSpec
Copyright © 2009–2015. All rights reserved.