com.epam.mdp.full.session.client
Class TwinStreamChannel

java.lang.Object
  extended by com.epam.mdp.full.session.client.TwinStreamChannel
All Implemented Interfaces:
IStreamChannel, ITwinStreamChannel

public class TwinStreamChannel
extends java.lang.Object
implements ITwinStreamChannel

This class provides the functionality to establish a connection with FAST servers, reading data and transforming them into FIX message.

Author:
Volodymyr_Biloshkurskyi Date: Apr 19, 20011

Constructor Summary
TwinStreamChannel(Transport primaryTransport, Transport backupTransport, FIXStreamListener listener, FASTDecoderFactory decoderFactory, com.epam.mdp.full.coders.stream.SeqNumHelper secNumHelper, TransportType transportType)
           
 
Method Summary
 void connect()
          Connect all transports to the servers.
 void disconnect()
          Disconnect all transports.
 int getBackupPort()
          Returns Port of client transport.
 FASTDecoderFactory getDecoderFactory()
          Returns decoder associate with this channel.
 int getPort()
          Returns Port of client transport.
 int getPrimaryPort()
          Returns Port of client transport.
 boolean isStarted()
          Returns true if at least one transport connected.
 void resetSeqNum(long newSeqNum)
          Resets channel data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwinStreamChannel

public TwinStreamChannel(Transport primaryTransport,
                         Transport backupTransport,
                         FIXStreamListener listener,
                         FASTDecoderFactory decoderFactory,
                         com.epam.mdp.full.coders.stream.SeqNumHelper secNumHelper,
                         TransportType transportType)
Method Detail

getDecoderFactory

public FASTDecoderFactory getDecoderFactory()
Description copied from interface: IStreamChannel
Returns decoder associate with this channel.

Specified by:
getDecoderFactory in interface IStreamChannel
Returns:
Decoder

isStarted

public boolean isStarted()
Returns true if at least one transport connected.

Specified by:
isStarted in interface IStreamChannel
Returns:
true if at least one transport connected.

getPort

public int getPort()
Returns Port of client transport.

Specified by:
getPort in interface IStreamChannel
Returns:
Port of client transport.

getPrimaryPort

public int getPrimaryPort()
Returns Port of client transport.

Returns:
Port of client transport.

getBackupPort

public int getBackupPort()
Returns Port of client transport.

Returns:
Port of client transport.

connect

public void connect()
             throws java.io.IOException
Connect all transports to the servers.

Specified by:
connect in interface IStreamChannel
Throws:
java.io.IOException - If connect does not establish.

disconnect

public void disconnect()
                throws java.io.IOException
Disconnect all transports.

Specified by:
disconnect in interface IStreamChannel
Throws:
java.io.IOException - If connect does not closed.

resetSeqNum

public void resetSeqNum(long newSeqNum)
Description copied from interface: IStreamChannel
Resets channel data.

Specified by:
resetSeqNum in interface IStreamChannel
Parameters:
newSeqNum - the new seq num


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.