List of usage examples for org.springframework.integration.ip.tcp.connection TcpConnectionInterceptorFactory getInterceptor
TcpConnectionInterceptorSupport getInterceptor();
From source file:org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory.java
protected TcpConnection wrapConnection(TcpConnection connection) throws Exception { if (this.interceptorFactoryChain == null) { return connection; }/*from www . ja v a 2 s. c o m*/ TcpConnectionInterceptorFactory[] interceptorFactories = this.interceptorFactoryChain .getInterceptorFactories(); if (interceptorFactories == null) { return connection; } for (TcpConnectionInterceptorFactory factory : interceptorFactories) { TcpConnectionInterceptor wrapper = factory.getInterceptor(); wrapper.setTheConnection(connection); // if no ultimate listener or sender, register each wrapper in turn if (this.listener == null) { connection.registerListener(wrapper); } if (this.sender == null) { connection.registerSender(wrapper); } connection = wrapper; } return connection; }