|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.devexperts.qd.qtp.AbstractMessageConnector
public abstract class AbstractMessageConnector
Field Summary | |
---|---|
static long |
DEFAULT_READ_AGGREGATION_SIZE
Maximum number of bytes to aggregate before processing when reading data from socket. |
static long |
DEFAULT_RECONNECT_DELAY
Default reconnection delay. |
protected com.devexperts.logging.Logging |
log
|
Constructor Summary | |
---|---|
protected |
AbstractMessageConnector(com.devexperts.connector.proto.ApplicationConnectionFactory factory)
Constructs new abstract message connector. |
Method Summary | |
---|---|
void |
addClosedConnectionStats(com.devexperts.transport.stats.ConnectionStats stats)
|
void |
addMessageConnectorListener(MessageConnectorListener listener)
Adds the specified listener to this message connector. |
com.devexperts.transport.stats.EndpointStats |
getEndpointStats()
Returns statistics for this message connector. |
com.devexperts.connector.proto.ApplicationConnectionFactory |
getFactory()
|
com.devexperts.logging.Logging |
getLogging()
Returns Logging instance that is tied to this MessageConnector and
includes this connector's name into the logs. |
java.lang.String |
getName()
Returns short string description of thic connector for management and logging purposes. |
long |
getReconnectDelay()
Returns reconnection delay. |
QDStats |
getStats()
Returns QDStats assosiated with this message connector. |
int |
getThreadPriority()
Returns thread priority for all threads created by this connector. |
void |
notifyMessageConnectorListeners()
|
protected void |
reconfigure()
|
void |
removeMessageConnectorListener(MessageConnectorListener listener)
Removes the specified listener from this message connector. |
void |
restart()
Restarts connector (connection is immediately dropped and established again). |
void |
setName(java.lang.String name)
Overrides short string description of this connector for management and logging purposes. |
void |
setReconnectDelay(long reconnectDelay)
Sets reconnection delay. |
void |
setStats(QDStats stats)
|
void |
setThreadPriority(int priority)
Sets thread priority for all threads created by this connector. |
abstract void |
start()
Starts connector (connection is immediately established). |
abstract void |
stop()
Stops connector (connection is immediately dropped). |
java.lang.String |
toString()
Returns name of this connector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.devexperts.qd.qtp.MessageConnector |
---|
getAddress, getConnectionCount, getState, isActive |
Field Detail |
---|
protected com.devexperts.logging.Logging log
public static final long DEFAULT_RECONNECT_DELAY
public static final long DEFAULT_READ_AGGREGATION_SIZE
Constructor Detail |
---|
protected AbstractMessageConnector(com.devexperts.connector.proto.ApplicationConnectionFactory factory)
factory
- application connection factory to use
java.lang.NullPointerException
- if factory
is null
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
getName()
public java.lang.String getName()
setName(java.lang.String)
method.
getName
in interface MessageConnector
setName(String)
public void setName(java.lang.String name)
setName
in interface MessageConnector
name
- connector name to set; it may be null
in which case default
autogenerated name will be used.getName()
public com.devexperts.connector.proto.ApplicationConnectionFactory getFactory()
public long getReconnectDelay()
MessageConnector
getReconnectDelay
in interface MessageConnector
public void setReconnectDelay(long reconnectDelay)
MessageConnector
setReconnectDelay
in interface MessageConnector
reconnectDelay
- reconnection delaypublic QDStats getStats()
MessageConnector
QDStats
assosiated with this message connector.
getStats
in interface MessageConnector
public void setStats(QDStats stats)
setStats
in interface MessageConnector
public abstract void start()
MessageConnector
start
in interface MessageConnector
public abstract void stop()
MessageConnector
stop
in interface MessageConnector
public void restart()
MessageConnector
MessageConnector.stop()
and MessageConnector.start()
in sequence.
restart
in interface MessageConnector
protected void reconfigure()
public void setThreadPriority(int priority)
MessageConnector
setThreadPriority
in interface MessageConnector
priority
- thread priority for all threads created by this connectorpublic int getThreadPriority()
MessageConnector
getThreadPriority
in interface MessageConnector
public com.devexperts.transport.stats.EndpointStats getEndpointStats()
MessageConnector
getEndpointStats
in interface MessageConnector
public void addClosedConnectionStats(com.devexperts.transport.stats.ConnectionStats stats)
public void addMessageConnectorListener(MessageConnectorListener listener)
MessageConnector
listener
to this message connector.
addMessageConnectorListener
in interface MessageConnector
listener
- newly adding MessageConnectorListener
.public void removeMessageConnectorListener(MessageConnectorListener listener)
MessageConnector
listener
from this message connector.
removeMessageConnectorListener
in interface MessageConnector
listener
- removing MessageConnectorListener
.public void notifyMessageConnectorListeners()
public com.devexperts.logging.Logging getLogging()
Logging
instance that is tied to this MessageConnector and
includes this connector's name into the logs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |