Example usage for org.springframework.amqp.rabbit.connection ConnectionListener onCreate

List of usage examples for org.springframework.amqp.rabbit.connection ConnectionListener onCreate

Introduction

In this page you can find the example usage for org.springframework.amqp.rabbit.connection ConnectionListener onCreate.

Prototype

void onCreate(Connection connection);

Source Link

Document

Called when a new connection is established.

Usage

From source file:acromusashi.stream.component.rabbitmq.CachingConnectionFactory.java

@Override
public void addConnectionListener(ConnectionListener listener) {
    super.addConnectionListener(listener);
    // If the connection is already alive we assume that the new listener wants to be notified
    if (this.connection != null) {
        listener.onCreate(this.connection);
    }//w ww .jav a  2 s .c  o  m
}

From source file:org.springframework.amqp.rabbit.connection.SingleConnectionFactory.java

public void addConnectionListener(ConnectionListener listener) {
    this.listener.addDelegate(listener);
    // If the connection is already alive we assume that the new listener wants to be notified
    if (this.connection != null) {
        listener.onCreate(this.connection);
    }/*  ww w.j a v  a  2 s  .  c  om*/
}