Search in sources :

Example 1 with BlockingNotifier

use of org.apache.qpid.qmf2.common.BlockingNotifier in project qpid by apache.

the class ConnectionProxy method createConnection.

/**
     * Actually create the Qpid Connection and QMF2 Console specified in the Constructor.
     */
private synchronized void createConnection() {
    //System.out.println("ConnectionProxy createConnection() name: " + _name + ", thread: " + Thread.currentThread().getId() + ", creating connection to " + _url + ", options " + _connectionOptions);
    try {
        _connection = ConnectionHelper.createConnection(_url, _connectionOptions);
        if (_connection != null) {
            _connection.setExceptionListener(this);
            // front of the WorkQueue if it exceeds a particular size.
            if (_disableEvents) {
                _console = new Console(_name, null, null, null);
                _console.disableEvents();
            } else {
                BlockingNotifier notifier = new BlockingNotifier();
                _console = new Console(_name, null, notifier, null);
            }
            _console.addConnection(_connection);
            _connected = true;
            _expireCount = UNUSED_THRESHOLD;
            notifyAll();
        }
    } catch (Exception ex) {
        _log.info("Exception {} caught in ConnectionProxy constructor.", ex.getMessage());
        _connected = false;
    }
}
Also used : BlockingNotifier(org.apache.qpid.qmf2.common.BlockingNotifier) Console(org.apache.qpid.qmf2.console.Console) QmfException(org.apache.qpid.qmf2.common.QmfException) JMSException(javax.jms.JMSException)

Aggregations

JMSException (javax.jms.JMSException)1 BlockingNotifier (org.apache.qpid.qmf2.common.BlockingNotifier)1 QmfException (org.apache.qpid.qmf2.common.QmfException)1 Console (org.apache.qpid.qmf2.console.Console)1