com.devexperts.qd.qtp
Interface MessageConnector

All Known Subinterfaces:
ClientSocketConnectorMBean, FileConnectorMBean, HttpConnectorMBean, NioServerConnectorMBean, ServerSocketConnectorMBean
All Known Implementing Classes:
AbstractMessageConnector, ClientSocketConnector, FileConnector, HttpConnector, NioServerConnector, ServerSocketConnector

public interface MessageConnector


Method Summary
 void addMessageConnectorListener(MessageConnectorListener listener)
          Adds the specified listener to this message connector.
 java.lang.String getAddress()
          Returns address string of this connector.
 int getConnectionCount()
          Returns number of established connections.
 com.devexperts.transport.stats.EndpointStats getEndpointStats()
          Returns statistics for this message connector.
 java.lang.String getName()
          Returns connector's short name for logging and monitoring.
 long getReconnectDelay()
          Returns reconnection delay.
 MessageConnectorState getState()
          Returns description of connectior's state as a string.
 QDStats getStats()
          Returns QDStats assosiated with this message connector.
 int getThreadPriority()
          Returns thread priority for all threads created by this connector.
 boolean isActive()
          Returns true if connector is started (not stopped).
 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)
          Sets connector's short name for logging and monitoring.
 void setReconnectDelay(long delay)
          Sets reconnection delay.
 void setStats(QDStats stats)
           
 void setThreadPriority(int priority)
          Sets thread priority for all threads created by this connector.
 void start()
          Starts connector (connection is immediately established).
 void stop()
          Stops connector (connection is immediately dropped).
 

Method Detail

getStats

QDStats getStats()
Returns QDStats assosiated with this message connector.

Returns:
QDStats assosiated with this message connector

setStats

void setStats(QDStats stats)

getAddress

java.lang.String getAddress()
Returns address string of this connector. It is "[host1[:port1],host2[:port2],...]:port" for client socket connector and ":port" for server socket connector.

Returns:
address string of this connector

start

void start()
Starts connector (connection is immediately established). Does nothing if connector is already started.


stop

void stop()
Stops connector (connection is immediately dropped). Does nothing if connector is stopped.


restart

void restart()
Restarts connector (connection is immediately dropped and established again). It basically does stop() and start() in sequence.


isActive

boolean isActive()
Returns true if connector is started (not stopped).

Returns:
true if connector is started (not stopped)

getState

MessageConnectorState getState()
Returns description of connectior's state as a string.

Returns:
description of connectior's state as a string

getName

java.lang.String getName()
Returns connector's short name for logging and monitoring.

Returns:
connector's short name for logging and monitoring

setName

void setName(java.lang.String name)
Sets connector's short name for logging and monitoring.

Parameters:
name - connector's new short name for logging and monitoring

getConnectionCount

int getConnectionCount()
Returns number of established connections.

Returns:
number of established connections

getThreadPriority

int getThreadPriority()
Returns thread priority for all threads created by this connector.

Returns:
thread priority for all threads created by this connector

setThreadPriority

void setThreadPriority(int priority)
Sets thread priority for all threads created by this connector.

Parameters:
priority - thread priority for all threads created by this connector

getReconnectDelay

long getReconnectDelay()
Returns reconnection delay.

Returns:
reconnection delay

setReconnectDelay

void setReconnectDelay(long delay)
Sets reconnection delay.

Parameters:
delay - reconnection delay

getEndpointStats

com.devexperts.transport.stats.EndpointStats getEndpointStats()
Returns statistics for this message connector.

Returns:
statistics for this message connector

addMessageConnectorListener

void addMessageConnectorListener(MessageConnectorListener listener)
Adds the specified listener to this message connector.

Parameters:
listener - newly adding MessageConnectorListener.

removeMessageConnectorListener

void removeMessageConnectorListener(MessageConnectorListener listener)
Removes the specified listener from this message connector.

Parameters:
listener - removing MessageConnectorListener.