Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.mfd.api
Class SrvrSession

    java.lang.Object
      ru.mfd.api.SrvrSession

    public class SrvrSession

extends java.lang.Object

This API allows third party applications to connect to the IFH systems, send subscription and market data requests, submit transactions.

User: MMarkelov Date: 08.10.12 Time: 16:15

Constructor Summary
`SrvrSession()` Initializes a new instance of this class and opens socket channel selector.

Method Summary
`void` | `connect(java.lang.String hostAddr, int hostPort, java.lang.String name, java.lang.String password, SrvrSessionListener listener, int connectionTimeout)` Connects client to server.
`void` | `disconnect()` Closes connection to server.
`static java.lang.String` | `getType()` Returns this client API type.
`static java.lang.String` | `getVersion()` Returns this client API version.
`void` | `setCatalogName(java.lang.String catalogName)` Changes the name of catalog to the argument `catalogName` and reloads the catalog.
`void` | `setPartInsert(boolean partInsert)` Makes table events listener `TableListener` invoke `onPartInsert` callback for partial inserts instead of `onInsert` if server supports this type of messages as well.
`void` | `setReadTimeout(int millis)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SrvrSession

    public SrvrSession()
                throws java.io.IOException

  Initializes a new instance of this class and opens socket channel selector.

  Throws:
    `java.io.IOException` - If an I/O error occurs

Method Detail

### setCatalogName

    public void setCatalogName(java.lang.String catalogName)

  Changes the name of catalog to the argument `catalogName` and reloads the catalog.

### setPartInsert

    public void setPartInsert(boolean partInsert)

  Makes table events listener `TableListener` invoke `onPartInsert` callback for partial inserts instead of `onInsert` if server supports this type of messages as well.

### connect

    public void connect(java.lang.String hostAddr,
                        int hostPort,
                        java.lang.String name,
                        java.lang.String password,
                        SrvrSessionListener listener,
                        int connectionTimeout)
                 throws java.io.IOException,
                        ClientException

  Connects client to server. Blocks until connected or exception.

  Parameters:
    `hostAddr` - host name
    `hostPort` - port number
    `name` - system login
    `password` - system password
    `listener` - event client listener
    `connectionTimeout` - connection timeout in milliseconds, uses blocking mode if timeout is negative
  Throws:
    `ClientException` - if client is already connected
    `java.io.IOException` - if some other I/O error occurs

### setReadTimeout

    public void setReadTimeout(int millis)

### disconnect

    public void disconnect()

  Closes connection to server.

### getType

    public static java.lang.String getType()

  Returns this client API type.

  Returns:
    this client API type.

### getVersion

    public static java.lang.String getVersion()

  Returns this client API version.

  Returns:
    this client API version.

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2015 IFH-InfoCentre, Ltd.