// is supported by this Pipeline.
ProtocolHandler protocolHandler = null;
boolean cachedHandler = (mappedProtocols != null) &&
((protocolHandler = mappedProtocols.get(task.getSelectionKey())) != null);
SelectorThread selectorThread = task.getSelectorThread();
KeepAlivePipeline kap = (selectorThread == null) ? null
: selectorThread.getKeepAlivePipeline();
if (!isClbSet) {
String port = task.getSelectorThread().getPort() + "";
InetAddress inet = task.getSelectorThread().getInet();
// check if the port and address belong to admin listener
String adminport = ProxyConfig.getInstance().getAdminPort();
String adminaddress = ProxyConfig.getInstance().getAdminInet();
boolean isAdminPort = false;
if ((adminport != null) && (adminaddress != null)
&& (inet != null)) {
if (inet.getHostAddress().trim().equalsIgnoreCase(adminaddress) &&
port.trim().equals(adminport)) {
isAdminPort = true;
}
if (isAdminPort) {
removeProtocolFinder(sailfinProxyFinder);
removeProtocolHandler(sailfinProxyHandler);
}
if (logger.isLoggable(Level.FINE)){
logger.log(Level.FINE, "clb.proxy.portunif.disable_proxy", disableProxy);
}
}
isClbSet = true;
}
if (protocolFinders.isEmpty() || (kap == null) ||
protocolHandlers.isEmpty() ||
(task.getType() != Task.READ_TASK) ||
(kap.isKeepAlive(task.getSelectionKey()) && !cachedHandler &&
disableProxy)) {
if (logger.isLoggable(Level.FINEST)){
logger.log(Level.FINEST,
"clb.proxy.portunif.add_defaulttask");
}