public String adjustRelativePath(String path, String relativeTo) { String newPath = path; File f = new File(newPath); if ( !f.isAbsolute()) { newPath = relativeTo + File.separator + newPath; f = new File(newPath); } if (!f.exists()) { getLog().warn("configured file:["+newPath+"] does not exist."); } return newPath; }
public String adjustRelativePath(String path, String relativeTo) { String newPath = path; File f = new File(newPath); if ( !f.isAbsolute()) { newPath = relativeTo + File.separator + newPath; f = new File(newPath); } if (!f.exists()) { getLog().warn("configured file:["+newPath+"] does not exist."); } return newPath; }
public String adjustRelativePath(String path, String relativeTo) { String newPath = path; File f = new File(newPath); if ( !f.isAbsolute()) { newPath = relativeTo + File.separator + newPath; f = new File(newPath); } if (!f.exists()) { getLog().warn("configured file:["+newPath+"] does not exist."); } return newPath; }
public String adjustRelativePath(String path, String relativeTo) { String newPath = path; File f = new File(newPath); if ( !f.isAbsolute()) { newPath = relativeTo + File.separator + newPath; f = new File(newPath); } if (!f.exists()) { getLog().warn("configured file:["+newPath+"] does not exist."); } return newPath; }
/** * Generic property setter called when a property for which a specific * setter already exists within the * {@link org.apache.coyote.ProtocolHandler} needs to be made available to * sub-components. The specific setter will call this method to populate the * attributes. */ public void setAttribute(String name, Object value) { if (getLog().isTraceEnabled()) { getLog().trace(sm.getString("endpoint.setAttribute", name, value)); } attributes.put(name, value); } /**
/** * Used by sub-components to retrieve configuration information. * * @param key The name of the property for which the value should be * retrieved * * @return The value of the specified property */ public Object getAttribute(String key) { Object value = attributes.get(key); if (getLog().isTraceEnabled()) { getLog().trace(sm.getString("endpoint.getAttribute", key, value)); } return value; }
/** * Generic property setter called when a property for which a specific * setter already exists within the * {@link org.apache.coyote.ProtocolHandler} needs to be made available to * sub-components. The specific setter will call this method to populate the * attributes. */ public void setAttribute(String name, Object value) { if (getLog().isTraceEnabled()) { getLog().trace(sm.getString("abstractProtocolHandler.setAttribute", name, value)); } attributes.put(name, value); } /**
protected long countDownConnection() { CounterLatch latch = connectionCounterLatch; if (latch!=null) { long result = latch.countDown(); if (result<0) { getLog().warn("Incorrect connection count, multiple socket.close called on the same socket." ); } return result; } else return -1; }
protected long countDownConnection() { if (maxConnections==-1) return -1; LimitLatch latch = connectionLimitLatch; if (latch!=null) { long result = latch.countDown(); if (result<0) { getLog().warn("Incorrect connection count, multiple socket.close called on the same socket." ); } return result; } else return -1; }
protected long countDownConnection() { if (maxConnections==-1) return -1; LimitLatch latch = connectionLimitLatch; if (latch!=null) { long result = latch.countDown(); if (result<0) { getLog().warn("Incorrect connection count, multiple socket.close called on the same socket." ); } return result; } else return -1; }
protected long countDownConnection() { LimitLatch latch = connectionLimitLatch; if (latch!=null) { long result = latch.countDown(); if (result<0) { getLog().warn("Incorrect connection count, multiple socket.close called on the same socket." ); } return result; } else return -1; }
public boolean setProperty(String name, String value) { setAttribute(name, value); final String socketName = "socket."; try { if (name.startsWith(socketName)) { return IntrospectionUtils.setProperty(socketProperties, name.substring(socketName.length()), value); } else { return IntrospectionUtils.setProperty(this,name,value,false); } }catch ( Exception x ) { getLog().error("Unable to set attribute \""+name+"\" to \""+value+"\"",x); return false; } } public String getProperty(String name) {
public boolean setProperty(String name, String value) { setAttribute(name, value); final String socketName = "socket."; try { if (name.startsWith(socketName)) { return IntrospectionUtils.setProperty(socketProperties, name.substring(socketName.length()), value); } else { return IntrospectionUtils.setProperty(this,name,value,false); } }catch ( Exception x ) { getLog().error("Unable to set attribute \""+name+"\" to \""+value+"\"",x); return false; } } public String getProperty(String name) {
public boolean setProperty(String name, String value) { setAttribute(name, value); final String socketName = "socket."; try { if (name.startsWith(socketName)) { return IntrospectionUtils.setProperty(socketProperties, name.substring(socketName.length()), value); } else { return IntrospectionUtils.setProperty(this,name,value,false); } }catch ( Exception x ) { getLog().error("Unable to set attribute \""+name+"\" to \""+value+"\"",x); return false; } } public String getProperty(String name) {
protected long countDownConnection() { if (maxConnections==-1) return -1; LimitLatch latch = connectionLimitLatch; if (latch!=null) { long result = latch.countDown(); if (result<0) { getLog().warn(sm.getString("endpoint.warn.incorrectConnectionCount")); } return result; } else return -1; }
/** * Close the server socket (to prevent further connections) if the server * socket was originally bound on {@link #start()} (rather than on * {@link #init()}). * * @see #getBindOnInit() */ public final void closeServerSocketGraceful() { if (bindState == BindState.BOUND_ON_START) { bindState = BindState.SOCKET_CLOSED_ON_STOP; try { doCloseServerSocket(); } catch (IOException ioe) { getLog().warn(sm.getString("endpoint.serverSocket.closeFailed", getName()), ioe); } } }