public static String getSessionDirection(IoSessionEx session) {
        IoServiceEx service = session.getService();
        String connectionDirection;

        if (service instanceof IoAcceptorEx || service instanceof AbstractBridgeAcceptor) {
            connectionDirection = ACCEPT_DIRECTION;
        } else if (service instanceof IoConnectorEx || service instanceof AbstractBridgeConnector) {
            connectionDirection = CONNECT_DIRECTION;
        } else {
            connectionDirection = UNKNOWN_DIRECTION;
        }

        return connectionDirection;
    }
public static String getSessionDirection ( IoSessionEx session ) { IoServiceEx service = session . getService ( ) ; String connectionDirection ; if ( service instanceof IoAcceptorEx || service instanceof AbstractBridgeAcceptor ) { connectionDirection = ACCEPT_DIRECTION ; } else if ( service instanceof IoConnectorEx || service instanceof AbstractBridgeConnector ) { connectionDirection = CONNECT_DIRECTION ; } else { connectionDirection = UNKNOWN_DIRECTION ; } return connectionDirection ; }
Determine the session 'direction' (accept/connect/???). We need this to be determined just once, so that it hangs around
after the session is closed.