* @author Remy Maucherat
*/
public abstract class AbstractEndpoint {
- private static final Log log = LogFactory.getLog(AbstractEndpoint.class);
// -------------------------------------------------------------- Constants
protected static final StringManager sm = StringManager.getManager("org.apache.tomcat.util.net.res");
return IntrospectionUtils.setProperty(this,name,value,false);
}
}catch ( Exception x ) {
- log.error("Unable to set attribute \""+name+"\" to \""+value+"\"",x);
+ getLog().error("Unable to set attribute \""+name+"\" to \""+value+"\"",x);
return false;
}
}
s.setSoTimeout(getSocketProperties().getSoTimeout());
// TODO Consider hard-coding to s.setSoLinger(true,0)
s.setSoLinger(getSocketProperties().getSoLingerOn(),getSocketProperties().getSoLingerTime());
- if (log.isDebugEnabled()) {
- log.debug("About to unlock socket for:"+saddr);
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("About to unlock socket for:"+saddr);
}
s.connect(saddr,getSocketProperties().getUnlockTimeout());
- if (log.isDebugEnabled()) {
- log.debug("Socket unlock completed for:"+saddr);
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("Socket unlock completed for:"+saddr);
}
} catch(Exception e) {
- if (log.isDebugEnabled()) {
- log.debug(sm.getString("endpoint.debug.unlock", "" + getPort()), e);
+ if (getLog().isDebugEnabled()) {
+ getLog().debug(sm.getString("endpoint.debug.unlock", "" + getPort()), e);
}
} finally {
if (s != null) {
f = new File(path);
}
if (!f.exists()) {
- log.warn("configured file:["+path+"] does not exist.");
+ getLog().warn("configured file:["+path+"] does not exist.");
}
return path;
}
return val;
}
+ protected abstract Log getLog();
+
// -------------------- SSL related properties --------------------
private String algorithm = KeyManagerFactory.getDefaultAlgorithm();