|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.devexperts.qd.qtp.AbstractMessageConnector
com.devexperts.qd.qtp.file.FileConnector
@MessageConnectorSummary(info="Connects to a file.", addressFormat="file:", properties={"format -- file format (one of \"binary\", \"text\" or \"blob: public class FileConnector: \")","ignoretime -- ignore \".time\" files even if they present","start -- time to start playing from (if \".time\" file exists)","delayed -- delay relatively to current time (same as \"start=- \"), DEPRECATED","readAs -- overrides the type of read messages (one of \"ticker_data\", \"stream_data\", \"history_data\", or \"raw_data\", works for binary tape files only)"})
Reads messages from a specified URL or file. By default when reading from some file ".time" file with corresponding name is also read and the messages times are taken from it to mimick delays of original messages. If there is no ".time" file found then all messages are given out at once. It is possible to ignore ".time" files by using boolean option "ignoretime".
Field Summary |
---|
Fields inherited from class com.devexperts.qd.qtp.AbstractMessageConnector |
---|
DEFAULT_READ_AGGREGATION_SIZE, DEFAULT_RECONNECT_DELAY, log |
Constructor Summary | |
---|---|
FileConnector(com.devexperts.connector.proto.ApplicationConnectionFactory factory,
java.lang.String address)
Creates new file connector. |
|
FileConnector(MessageAdapter.Factory factory,
java.lang.String address)
Deprecated. use FileConnector(com.devexperts.connector.proto.ApplicationConnectionFactory , String) |
Method Summary | |
---|---|
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. |
FileFormat |
getFormat()
|
boolean |
getIgnoretime()
|
MessageConnectorState |
getState()
Returns description of connectior's state as a string. |
boolean |
isActive()
Returns true if connector is started (not stopped). |
void |
setAddress(java.lang.String address)
|
void |
setDelayed(TimePeriod delay)
|
void |
setFormat(FileFormat format)
|
void |
setIgnoretime(boolean ignore)
|
void |
setReadAs(MessageType readAs)
|
void |
setStart(java.util.Date time)
|
void |
start()
Starts connector (connection is immediately established). |
void |
stop()
Stops connector (connection is immediately dropped). |
Methods inherited from class com.devexperts.qd.qtp.AbstractMessageConnector |
---|
addClosedConnectionStats, addMessageConnectorListener, getFactory, getLogging, getName, getReconnectDelay, getStats, getThreadPriority, notifyMessageConnectorListeners, reconfigure, removeMessageConnectorListener, restart, setName, setReconnectDelay, setStats, setThreadPriority, toString |
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 |
---|
addMessageConnectorListener, getName, getReconnectDelay, getStats, getThreadPriority, removeMessageConnectorListener, restart, setName, setReconnectDelay, setStats, setThreadPriority |
Constructor Detail |
---|
@Deprecated public FileConnector(MessageAdapter.Factory factory, java.lang.String address)
FileConnector(com.devexperts.connector.proto.ApplicationConnectionFactory , String)
factory
- message adapter factory to useaddress
- address of file to use
java.lang.NullPointerException
- if factory
or address
is null
public FileConnector(com.devexperts.connector.proto.ApplicationConnectionFactory factory, java.lang.String address)
factory
- application connection factory to useaddress
- address of file to use
java.lang.NullPointerException
- if factory
or address
is null
Method Detail |
---|
public void start()
MessageConnector
start
in interface MessageConnector
start
in class AbstractMessageConnector
public void stop()
MessageConnector
stop
in interface MessageConnector
stop
in class AbstractMessageConnector
public java.lang.String getAddress()
MessageConnector
getAddress
in interface MessageConnector
public void setAddress(java.lang.String address)
setAddress
in interface FileConnectorMBean
public FileFormat getFormat()
getFormat
in interface FileConnectorMBean
public void setFormat(FileFormat format)
setFormat
in interface FileConnectorMBean
public boolean isActive()
MessageConnector
isActive
in interface MessageConnector
public MessageConnectorState getState()
MessageConnector
getState
in interface MessageConnector
public int getConnectionCount()
MessageConnector
getConnectionCount
in interface MessageConnector
public com.devexperts.transport.stats.EndpointStats getEndpointStats()
MessageConnector
getEndpointStats
in interface MessageConnector
getEndpointStats
in class AbstractMessageConnector
public void setStart(java.util.Date time)
public void setDelayed(TimePeriod delay)
public void setIgnoretime(boolean ignore)
setIgnoretime
in interface FileConnectorMBean
public void setReadAs(MessageType readAs)
public boolean getIgnoretime()
getIgnoretime
in interface FileConnectorMBean
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |