|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.connection.impl.AbstractConnection
com.genesyslab.platform.voice.protocol.runtime.HAConnection
public class HAConnection
Please note, that unlike TLib 7.1 this connection doesn't waitResponse primary connection and link status inside open(). So, if you call write() before "opened" event has come then you're on your own.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.genesyslab.platform.commons.connection.impl.AbstractConnection |
---|
com.genesyslab.platform.commons.connection.impl.AbstractConnection.CloseCommand |
Field Summary |
---|
Fields inherited from class com.genesyslab.platform.commons.connection.impl.AbstractConnection |
---|
_syncConfig, address, connHandler, host, port |
Fields inherited from interface com.genesyslab.platform.commons.connection.Connection |
---|
BACKUP_BIND_PORT_KEY, BIND_HOST_KEY, BIND_PORT_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 Summary | |
---|---|
HAConnection(ConnectionSettings connectionSettings,
java.lang.Object proxySync)
|
Method Summary | |
---|---|
void |
configure(ConnectionConfiguration config)
Configures or reconfigures this connection's additional parameters. |
protected void |
doClose(java.lang.Throwable closeReason)
|
void |
forceClose(java.lang.Throwable reason)
|
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()
|
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 |
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)
|
protected void |
startClose(java.lang.Throwable reason)
|
java.lang.String |
toString()
|
Methods inherited from class com.genesyslab.platform.commons.connection.impl.AbstractConnection |
---|
close, close, context, forceClose, getConnection, getConnectionState, getExecutor, getHost, getId, getLocalBindHost, getLocalBindPort, getPort, getStringAttributesEncoding, getUri, notifyCloseHandler, notifyEstablishedHandler, registerConfigurationHandlers, setConnectionHandler, setContext, setExecutor, setLocalBindHost, setLocalBindPort, setStringAttributesEncoding, setUri, setUri, unregisterConfigurationHandlers |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HAConnection(ConnectionSettings connectionSettings, java.lang.Object proxySync)
Method Detail |
---|
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)
startClose
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
public void forceClose(java.lang.Throwable reason)
forceClose
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
protected void doClose(java.lang.Throwable closeReason)
doClose
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
public boolean hasUnsetBytes()
Connection
hasUnsetBytes
in interface Connection
hasUnsetBytes
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
public long getUnsetBytes()
Connection
getUnsetBytes
in interface Connection
getUnsetBytes
in class com.genesyslab.platform.commons.connection.impl.AbstractConnection
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |