Package com.sun.sgs.io

Examples of com.sun.sgs.io.ConnectionListener


    @Override
    public void sessionOpened(IoSession session) throws Exception
    {
        SocketConnection conn = (SocketConnection) session.getAttachment();
        logger.log(Level.FINE, "opened session {0}", session);
        ConnectionListener listener = conn.getConnectionListener();
        listener.connected(conn);
    }
View Full Code Here


    @Override
    public void sessionClosed(IoSession session) throws Exception
    {
        SocketConnection conn = (SocketConnection) session.getAttachment();
        logger.log(Level.FINE, "disconnect on {0}", conn);
        ConnectionListener listener = conn.getConnectionListener();
        listener.disconnected(conn);
    }
View Full Code Here

        logger.logThrow(Level.FINER, exception, "exception on {0}", conn);
        if (conn == null) {
            return;
        }

        ConnectionListener listener = conn.getConnectionListener();
        listener.exceptionThrown(conn, exception);
    }
View Full Code Here

         */
        @Override
        public void sessionCreated(IoSession session) throws Exception {
            logger.log(Level.FINE, "accepted session {0}", session);
            CompleteMessageFilter filter = new CompleteMessageFilter();
            ConnectionListener connListener = acceptorListener.newConnection();
            SocketConnection connection =
                new SocketConnection(connListener, filter, session);
            session.setAttachment(connection);
        }
View Full Code Here

    @Override
    public void sessionOpened(IoSession session) throws Exception
    {
        SocketConnection conn = (SocketConnection) session.getAttachment();
        logger.log(Level.FINE, "opened session {0}", session);
        ConnectionListener listener = conn.getConnectionListener();
        listener.connected(conn);
    }
View Full Code Here

    @Override
    public void sessionClosed(IoSession session) throws Exception
    {
        SocketConnection conn = (SocketConnection) session.getAttachment();
        logger.log(Level.FINE, "disconnect on {0}", conn);
        ConnectionListener listener = conn.getConnectionListener();
        listener.disconnected(conn);
    }
View Full Code Here

        logger.logThrow(Level.FINER, exception, "exception on {0}", conn);
        if (conn == null) {
            return;
        }

        ConnectionListener listener = conn.getConnectionListener();
        listener.exceptionThrown(conn, exception);
    }
View Full Code Here

         */
        @Override
        public void sessionCreated(IoSession session) throws Exception {
            logger.log(Level.FINE, "accepted session {0}", session);
            CompleteMessageFilter filter = new CompleteMessageFilter();
            ConnectionListener connListener = acceptorListener.newConnection();
            SocketConnection connection =
                new SocketConnection(connListener, filter, session);
            session.setAttachment(connection);
        }
View Full Code Here

        final CountDownLatch connectLatch = new CountDownLatch(1);

        Connector<SocketAddress> connector =
            connectEndpoint.createConnector();

        ConnectionListener listener = new ConnectionAdapter() {
            @Override
            public void connected(Connection conn) {
                System.err.println("connected");
                connectLatch.countDown();
            }
View Full Code Here

     */
    public void testMultipleConnect() throws IOException {
        Connector<SocketAddress> connector =
            connectEndpoint.createConnector();

        ConnectionListener listener = new ConnectionAdapter();

        connector.connect(listener);

        try {
            connector.connect(listener);
View Full Code Here

TOP

Related Classes of com.sun.sgs.io.ConnectionListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.