|
|||||||||
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 in QTP. |
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 this connector for management and logging purposes. |
long |
getReconnectDelay()
Returns reconnection delay. |
QDStats |
getStats()
Returns QDStats associated 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)
Changes QDStats associated with this message connector. |
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.MessageConnectorMBean |
---|
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
readAggregationSize + chunkLength <= parserBufferSize
.
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 MessageConnectorMBean
setName(String)
public void setName(java.lang.String name)
setName
in interface MessageConnectorMBean
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()
MessageConnectorMBean
getReconnectDelay
in interface MessageConnectorMBean
public void setReconnectDelay(long reconnectDelay)
MessageConnectorMBean
setReconnectDelay
in interface MessageConnectorMBean
reconnectDelay
- reconnection delaypublic QDStats getStats()
MessageConnector
QDStats
associated with this message connector.
getStats
in interface MessageConnector
public void setStats(QDStats stats)
MessageConnector
QDStats
associated with this message connector.
setStats
in interface MessageConnector
public abstract void start()
MessageConnectorMBean
start
in interface MessageConnectorMBean
public abstract void stop()
MessageConnectorMBean
stop
in interface MessageConnectorMBean
public void restart()
MessageConnectorMBean
MessageConnectorMBean.stop()
and MessageConnectorMBean.start()
in sequence.
restart
in interface MessageConnectorMBean
protected void reconfigure()
public void setThreadPriority(int priority)
MessageConnectorMBean
setThreadPriority
in interface MessageConnectorMBean
priority
- thread priority for all threads created by this connectorpublic int getThreadPriority()
MessageConnectorMBean
getThreadPriority
in interface MessageConnectorMBean
public com.devexperts.transport.stats.EndpointStats getEndpointStats()
MessageConnectorMBean
getEndpointStats
in interface MessageConnectorMBean
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 |