com.paritytrading.philadelphia.FIXMessageListener Java Examples

The following examples show how to use com.paritytrading.philadelphia.FIXMessageListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Session.java    From philadelphia with Apache License 2.0 4 votes vote down vote up
static Session open(InetSocketAddress address,
        FIXConfig config, FIXMessageListener listener,
        FIXConnectionStatusListener statusListener) throws IOException {
    SocketChannel channel = SocketChannel.open();

    channel.connect(address);
    channel.configureBlocking(false);

    Selector selector = Selector.open();

    channel.register(selector, SelectionKey.OP_READ);

    FIXConnection connection = new FIXConnection(channel, config, listener, statusListener);

    return new Session(selector, connection);
}