Connection
, LogMessageFilterSupport
public class HAConnection extends com.genesyslab.platform.commons.connection.impl.AbstractConnection implements LogMessageFilterSupport
_syncConfig, address, connHandler, host, port
BACKLOG, BACKUP_BIND_PORT_KEY, BIND_HOST_KEY, BIND_PORT_KEY, CONN_PROXY_HOST_KEY, CONN_PROXY_PASS_KEY, CONN_PROXY_PORT_KEY, CONN_PROXY_TYPE_HTTP, CONN_PROXY_TYPE_KEY, CONN_PROXY_TYPE_SOCKS4, CONN_PROXY_TYPE_SOCKS5, CONN_PROXY_USER_KEY, CONNECTION_TIMEOUT_KEY, DEFAULT_ENABLE_IPV6, DEFAULT_IP_VERSION, DEFAULT_OPERATION_TIMEOUT, ENABLE_IPV6_KEY, IP_VERSION_4_6, IP_VERSION_6_4, IP_VERSION_KEY, KEEP_ALIVE_KEY, LAZY_PARSING_ENABLED_KEY, OPERATION_TIMEOUT_KEY, REUSE_ADDRESS_KEY, SSL_KEYSTORE_PASS, SSL_KEYSTORE_PATH_KEY, STR_ATTR_ENCODING_NAME_KEY, TLS_KEY, TLS_VERSION_KEY
Constructor | Description |
---|---|
HAConnection(ConnectionSettings connectionSettings,
java.lang.Object proxySync) |
Modifier and Type | Method | Description |
---|---|---|
void |
configure(ConnectionConfiguration config) |
Configures or reconfigures this connection's additional
parameters.
|
protected void |
doClose(java.lang.Throwable closeReason) |
Perform close operation itself.
|
void |
forceClose(java.lang.Throwable reason) |
|
ConnectionProxy |
getBackupProxy() |
|
TServerConnContext |
getHAConnectionContext() |
|
com.genesyslab.platform.commons.connection.interceptor.Interceptor |
getInterceptor() |
Returns interceptor of this connection.
|
java.net.InetSocketAddress |
getLocalEndPoint() |
Gets current local
InetSocketAddress of socket, if it is created. |
MessageFilter |
getLogMessageFilter() |
Gets current message logining filter.
|
MessagePackager |
getMessagePackager() |
|
MessageTransport |
getMessageTransport() |
|
ConnectionProxy |
getPrimaryProxy() |
|
java.net.InetSocketAddress |
getRemoteEndPoint() |
Gets current remote
InetSocketAddress of socket, if it is created. |
long |
getUnsetBytes() |
Gets amount of unsent bytes.
|
boolean |
hasUnsetBytes() |
Checks if some unsent bytes have been ramained.
|
void |
notifyErrorHandler(ProtocolException e) |
|
void |
notifyMessageHandler(Message msg) |
|
void |
open() |
Opens network connection to the server.
|
void |
setBackupProxy(ConnectionProxy proxy) |
|
void |
setConnectionState(ConnectionState state) |
|
void |
setInvoker(AsyncInvoker invoker) |
Connection can use invoker (if it's set) to parse messages.
|
void |
setLogMessageFilter(MessageFilter filter) |
Sets current message logining filter.
|
void |
setMessagePackager(MessagePackager packager) |
|
void |
setMessageTransport(MessageTransport transport) |
|
void |
setPrimaryProxy(ConnectionProxy proxy) |
|
protected void |
startClose(java.lang.Throwable reason) |
Perform "before close" cleanup.
|
java.lang.String |
toString() |
|
void |
writePostponedMessages() |
close, close, context, forceClose, getClosedCause, getConnection, getConnectionState, getExecutor, getHost, getId, getLocalBindHost, getLocalBindPort, getPort, getStringAttributesEncoding, getTimer, getUri, isForceClosing, notifyCloseHandler, notifyEstablishedHandler, registerConfigurationHandlers, setCloseCause, setConnectionHandler, setContext, setExecutor, setLocalBindHost, setLocalBindPort, setStringAttributesEncoding, setTimer, setUri, setUri, unregisterConfigurationHandlers
public HAConnection(ConnectionSettings connectionSettings, java.lang.Object proxySync)
public ConnectionProxy getPrimaryProxy()
public ConnectionProxy getBackupProxy()
public void setPrimaryProxy(ConnectionProxy proxy)
public void setBackupProxy(ConnectionProxy proxy)
public void open()
Connection
open
in interface Connection
open
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
public java.net.InetSocketAddress getRemoteEndPoint()
InetSocketAddress
of socket, if it is created.getRemoteEndPoint
in interface Connection
public java.net.InetSocketAddress getLocalEndPoint()
InetSocketAddress
of socket, if it is created.getLocalEndPoint
in interface Connection
public void configure(ConnectionConfiguration config)
Connection
configure
in interface Connection
config
- Connection parameterspublic com.genesyslab.platform.commons.connection.interceptor.Interceptor getInterceptor()
Connection
getInterceptor
in interface Connection
public void setMessageTransport(MessageTransport transport)
setMessageTransport
in interface Connection
public MessageTransport getMessageTransport()
getMessageTransport
in interface Connection
public void setInvoker(AsyncInvoker invoker)
Connection
setInvoker
in interface Connection
invoker
- async invokerpublic void setMessagePackager(MessagePackager packager)
setMessagePackager
in interface Connection
public MessagePackager getMessagePackager()
getMessagePackager
in interface Connection
public void setConnectionState(ConnectionState state)
setConnectionState
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
public void notifyMessageHandler(Message msg)
public void notifyErrorHandler(ProtocolException e)
public TServerConnContext getHAConnectionContext()
public MessageFilter getLogMessageFilter()
LogMessageFilterSupport
getLogMessageFilter
in interface LogMessageFilterSupport
public void setLogMessageFilter(MessageFilter filter)
LogMessageFilterSupport
setLogMessageFilter
in interface LogMessageFilterSupport
filter
- new message logining filter.public java.lang.String toString()
toString
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
protected void startClose(java.lang.Throwable reason)
com.genesyslab.platform.commons.connection.impl.AbstractConnection
startClose
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
reason
- Reason to close connectionpublic void forceClose(java.lang.Throwable reason)
forceClose
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
protected void doClose(java.lang.Throwable closeReason)
com.genesyslab.platform.commons.connection.impl.AbstractConnection
doClose
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
closeReason
- Reason to close connectionpublic void writePostponedMessages()
public boolean hasUnsetBytes()
com.genesyslab.platform.commons.connection.impl.AbstractConnection
hasUnsetBytes
in interface Connection
hasUnsetBytes
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
public long getUnsetBytes()
com.genesyslab.platform.commons.connection.impl.AbstractConnection
getUnsetBytes
in interface Connection
getUnsetBytes
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.