Example usage for org.springframework.web.context.request.async WebAsyncManager getCallableInterceptor

List of usage examples for org.springframework.web.context.request.async WebAsyncManager getCallableInterceptor

Introduction

In this page you can find the example usage for org.springframework.web.context.request.async WebAsyncManager getCallableInterceptor.

Prototype

@Nullable
public CallableProcessingInterceptor getCallableInterceptor(Object key) 

Source Link

Document

Get the CallableProcessingInterceptor registered under the given key.

Usage

From source file:org.springframework.data.neo4j.web.support.OpenSessionInViewInterceptor.java

private boolean applyCallableInterceptor(WebAsyncManager asyncManager, String key) {
    if (asyncManager.getCallableInterceptor(key) == null) {
        return false;
    }//from   w w w  .j a va  2  s . co m
    ((AsyncRequestInterceptor) asyncManager.getCallableInterceptor(key)).bindSession();
    return true;
}

From source file:org.springframework.orm.hibernate4.support.OpenSessionInViewInterceptor.java

private boolean applySessionBindingInterceptor(WebAsyncManager asyncManager, String key) {
    if (asyncManager.getCallableInterceptor(key) == null) {
        return false;
    }/*from   w  ww  .ja  v  a 2 s.c  o  m*/
    ((AsyncRequestInterceptor) asyncManager.getCallableInterceptor(key)).bindSession();
    return true;
}

From source file:org.springframework.orm.hibernate5.support.OpenSessionInViewInterceptor.java

private boolean applySessionBindingInterceptor(WebAsyncManager asyncManager, String key) {
    CallableProcessingInterceptor cpi = asyncManager.getCallableInterceptor(key);
    if (cpi == null) {
        return false;
    }//from   w  w w. j  a v  a  2s  . c  o m
    ((AsyncRequestInterceptor) cpi).bindSession();
    return true;
}