}
return c;
}
private SocketInterceptor initSocketInterceptor(SocketInterceptorConfig sic) {
SocketInterceptor implementation = null;
if (sic != null && sic.isEnabled()) {
implementation = (SocketInterceptor) sic.getImplementation();
if (implementation == null && sic.getClassName() != null) {
try {
implementation = (SocketInterceptor) Class.forName(sic.getClassName()).newInstance();
} catch (Throwable e) {
LOGGER.severe("SocketInterceptor class cannot be instantiated!" + sic.getClassName(), e);
}
}
}
if (implementation != null) {
implementation.init(sic.getProperties());
}
return implementation;
}