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;
}
}
Aggregations