Example usage for com.rabbitmq.client AlreadyClosedException AlreadyClosedException

List of usage examples for com.rabbitmq.client AlreadyClosedException AlreadyClosedException

Introduction

In this page you can find the example usage for com.rabbitmq.client AlreadyClosedException AlreadyClosedException.

Prototype

public AlreadyClosedException(ShutdownSignalException sse, Throwable cause) 

Source Link

Usage

From source file:de.htwk_leipzig.bis.connection.handshake.clientRewrite.Copyright.java

License:Mozilla Public License

private ShutdownSignalException startShutdown(Method reason, boolean initiatedByApplication, Throwable cause,
        boolean notifyRpc) {
    ShutdownSignalException sse = new ShutdownSignalException(true, initiatedByApplication, reason, this);
    sse.initCause(cause);//from  ww w . ja  v  a  2 s.c  om
    if (!setShutdownCauseIfOpen(sse)) {
        if (initiatedByApplication)
            throw new AlreadyClosedException(getCloseReason(), cause);
    }

    // stop any heartbeating
    _heartbeatSender.shutdown();

    _channel0.processShutdownSignal(sse, !initiatedByApplication, notifyRpc);

    return sse;
}