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

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

public class StreamChannel
extends java.lang.Object
implements IStreamChannel

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

Author:
Serhiy_Zahriychuk Date: Feb 19, 2009

Constructor Summary
StreamChannel(Transport transport, FIXStreamListener listener, FASTDecoderFactory factoryDecoder, com.epam.mdp.full.coders.stream.SeqNumHelper secNumHelper, TransportType transportType)
          Creates the FastChannel with specified version.
StreamChannel(Transport transport, FIXStreamListener listener, TemplateContainer templateContainer, ChannelVersion chanelVersion, TransportType transportType)
          Deprecated. 
StreamChannel(Transport transport, FIXStreamListener listener, TemplateContainer templateContainer, TransportType transportType)
          Deprecated. 
 
Method Summary
 void connect()
          Connect all transports to the servers.
 void disconnect()
          Disconnect all transports.
 FASTDecoderFactory getDecoderFactory()
          Returns decoder associate with this channel.
 int getPort()
          Returns Port of client transport.
 boolean isStarted()
          Returns true if at least one transport connected.
 boolean onNextMessageReceived(long seqNum)
           
 void reset(long seqNum)
           
 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

StreamChannel

@Deprecated
public StreamChannel(Transport transport,
                                FIXStreamListener listener,
                                TemplateContainer templateContainer,
                                TransportType transportType)
Deprecated. 

Constructor for create instance of FastClient.

Parameters:
transport - Instance of Client transport.
listener - Instance of FAST listener.
templateContainer - Container of FAST templates.

StreamChannel

@Deprecated
public StreamChannel(Transport transport,
                                FIXStreamListener listener,
                                TemplateContainer templateContainer,
                                ChannelVersion chanelVersion,
                                TransportType transportType)
Deprecated. 

Creates the FastChannel with specified version.

Parameters:
transport - Instance of Client transport.
listener - Instance of FAST listener.
templateContainer - Container of FAST templates.

StreamChannel

public StreamChannel(Transport transport,
                     FIXStreamListener listener,
                     FASTDecoderFactory factoryDecoder,
                     com.epam.mdp.full.coders.stream.SeqNumHelper secNumHelper,
                     TransportType transportType)
Creates the FastChannel with specified version.

Parameters:
transport - Instance of Client transport.
listener - Instance of FAST listener.
Method Detail

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.

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.

getDecoderFactory

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

Specified by:
getDecoderFactory in interface IStreamChannel
Returns:
Decoder

onNextMessageReceived

public boolean onNextMessageReceived(long seqNum)

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

reset

public void reset(long seqNum)


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