/**
* Return a string representation of this event.
*/
+ @Override
public String toString() {
return ("ContainerEvent['" + getContainer() + "','" +
/**
* Returns the message associated with this exception, if any.
*/
+ @Override
public String getMessage() {
return (message);
/**
* Return a formatted string that describes this exception.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("LifecycleException: ");
/**
* Return a string representation of this event.
*/
+ @Override
public String toString() {
return ("SessionEvent['" + getSession() + "','" +
*
* @exception BuildException if a validation error occurs
*/
+ @Override
public void execute() throws BuildException {
if ((username == null) || (password == null) || (url == null)) {
*
* @param output The output to log. Should not be <code>null</code>.
*/
+ @Override
protected void handleOutput(String output) {
if (redirectOutput) {
if (redirectOutPrintStream == null) {
* @param output The output to log. Should not be <code>null</code>.
*
*/
+ @Override
protected void handleFlush(String output) {
handleOutput(output);
redirectOutPrintStream.flush();
*
* @param output The error output to log. Should not be <code>null</code>.
*/
+ @Override
protected void handleErrorOutput(String output) {
if (redirectOutput) {
if (redirectErrPrintStream == null) {
* @param output The error output to log. Should not be <code>null</code>.
*
*/
+ @Override
protected void handleErrorFlush(String output) {
handleErrorOutput(output);
redirectErrPrintStream.flush();
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
* @exception BuildException
* if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
if (bean == null || attribute == null) {
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
String queryString = (query == null) ? "":("?qry="+query);
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
if (bean == null || attribute == null || value == null) {
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
*
* @exception BuildException if an error occurs
*/
+ @Override
public void execute() throws BuildException {
super.execute();
*
* @exception BuildException if a validation error occurs
*/
+ @Override
public void execute() throws BuildException {
if (path == null) {
* <code><description>/<version></code>.
* @return Returns the class info.
*/
+ @Override
public String getInfo() {
return (info);
* @exception Exception
* if an error occurs
*/
+ @Override
public String jmxExecute(MBeanServerConnection jmxServerConnection)
throws Exception {
* corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
* @exception BuildException
* if an error occurs
*/
+ @Override
public String jmxExecute(MBeanServerConnection jmxServerConnection)
throws Exception {
* corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
* @exception BuildException
* if an error occurs
*/
+ @Override
public String jmxExecute(MBeanServerConnection jmxServerConnection)
throws Exception {
* corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
* @exception Exception
* if an error occurs
*/
+ @Override
public String jmxExecute(MBeanServerConnection jmxServerConnection)
throws Exception {
* corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
* @exception Exception
* if an error occurs
*/
+ @Override
public String jmxExecute(MBeanServerConnection jmxServerConnection)
throws Exception {
* <code><description>/<version></code>.
* @return Returns the class info.
*/
+ @Override
public String getInfo() {
return (info);
* @exception Exception
* if an error occurs
*/
+ @Override
public String jmxExecute(MBeanServerConnection jmxServerConnection)
throws Exception {
/**
* Return the Container to which this Valve is attached.
*/
+ @Override
public Container getContainer() {
return (this.context);
*
* @param container The container to which we are attached
*/
+ @Override
public void setContainer(Container container) {
if (!(container instanceof Context))
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception IOException if an input/output error occurs
* @exception ServletException if thrown by a processing element
*/
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public boolean authenticate(Request request,
Response response,
LoginConfig config)
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public boolean authenticate(Request request,
Response response,
LoginConfig config)
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public boolean authenticate(Request request,
Response response,
LoginConfig config)
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public boolean authenticate(Request request,
Response response,
LoginConfig config)
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public boolean authenticate(Request request,
Response response,
LoginConfig config)
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
+ @Override
public void start() throws LifecycleException {
super.start();
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
+ @Override
public void stop() throws LifecycleException {
super.stop();
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
/**
* Return a String rendering of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SingleSignOn[");
/**
* Returns the message associated with this exception, if any.
*/
+ @Override
public String getMessage() {
return (message);
/**
* Returns the cause that caused this exception, if any.
*/
+ @Override
public Throwable getCause() {
return (throwable);
/**
* Return a formatted string that describes this exception.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ClientAbortException: ");
}
}
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append(super.toString());
/**
* Prevent cloning the facade.
*/
+ @Override
protected Object clone()
throws CloneNotSupportedException {
throw new CloneNotSupportedException();
// --------------------------------------------- ServletInputStream Methods
+ @Override
public int read()
throws IOException {
if (SecurityUtil.isPackageProtectionEnabled()){
}
}
+ @Override
public int available() throws IOException {
if (SecurityUtil.isPackageProtectionEnabled()){
}
}
+ @Override
public int read(final byte[] b) throws IOException {
if (SecurityUtil.isPackageProtectionEnabled()){
}
+ @Override
public int read(final byte[] b, final int off, final int len)
throws IOException {
}
+ @Override
public int readLine(byte[] b, int off, int len) throws IOException {
return super.readLine(b, off, len);
}
* Since we re-cycle, we can't allow the call to super.close()
* which would permantely disable us.
*/
+ @Override
public void close() throws IOException {
if (SecurityUtil.isPackageProtectionEnabled()){
/**
* Prevent cloning the facade.
*/
+ @Override
protected Object clone()
throws CloneNotSupportedException {
throw new CloneNotSupportedException();
// --------------------------------------------------- OutputStream Methods
+ @Override
public void write(int i)
throws IOException {
ob.writeByte(i);
}
+ @Override
public void write(byte[] b)
throws IOException {
write(b, 0, b.length);
}
+ @Override
public void write(byte[] b, int off, int len)
throws IOException {
ob.write(b, off, len);
/**
* Will send the buffer to the client.
*/
+ @Override
public void flush()
throws IOException {
ob.flush();
}
+ @Override
public void close()
throws IOException {
ob.close();
* Return a String representation of this object, which exposes only
* information that should be public.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("CoyotePrincipal[");
/**
* Prevent cloning the facade.
*/
+ @Override
protected Object clone()
throws CloneNotSupportedException {
throw new CloneNotSupportedException();
// --------------------------------------------------------- Reader Methods
+ @Override
public void close()
throws IOException {
ib.close();
}
+ @Override
public int read()
throws IOException {
return ib.read();
}
+ @Override
public int read(char[] cbuf)
throws IOException {
return ib.read(cbuf, 0, cbuf.length);
}
+ @Override
public int read(char[] cbuf, int off, int len)
throws IOException {
return ib.read(cbuf, off, len);
}
+ @Override
public long skip(long n)
throws IOException {
return ib.skip(n);
}
+ @Override
public boolean ready()
throws IOException {
return ib.ready();
}
+ @Override
public boolean markSupported() {
return true;
}
+ @Override
public void mark(int readAheadLimit)
throws IOException {
ib.mark(readAheadLimit);
}
+ @Override
public void reset()
throws IOException {
ib.reset();
}
+ @Override
public String readLine()
throws IOException {
/**
* Prevent cloning the facade.
*/
+ @Override
protected Object clone()
throws CloneNotSupportedException {
throw new CloneNotSupportedException();
// --------------------------------------------------------- Writer Methods
+ @Override
public void flush() {
if (error)
}
+ @Override
public void close() {
// We don't close the PrintWriter - super() is not called,
}
+ @Override
public boolean checkError() {
flush();
return error;
}
+ @Override
public void write(int c) {
if (error)
}
+ @Override
public void write(char buf[], int off, int len) {
if (error)
}
+ @Override
public void write(char buf[]) {
write(buf, 0, buf.length);
}
+ @Override
public void write(String s, int off, int len) {
if (error)
}
+ @Override
public void write(String s) {
write(s, 0, s.length());
}
// ---------------------------------------------------- PrintWriter Methods
+ @Override
public void print(boolean b) {
if (b) {
write("true");
}
+ @Override
public void print(char c) {
write(c);
}
+ @Override
public void print(int i) {
write(String.valueOf(i));
}
+ @Override
public void print(long l) {
write(String.valueOf(l));
}
+ @Override
public void print(float f) {
write(String.valueOf(f));
}
+ @Override
public void print(double d) {
write(String.valueOf(d));
}
+ @Override
public void print(char s[]) {
write(s);
}
+ @Override
public void print(String s) {
if (s == null) {
s = "null";
}
+ @Override
public void print(Object obj) {
write(String.valueOf(obj));
}
+ @Override
public void println() {
write(LINE_SEP);
}
+ @Override
public void println(boolean b) {
print(b);
println();
}
+ @Override
public void println(char c) {
print(c);
println();
}
+ @Override
public void println(int i) {
print(i);
println();
}
+ @Override
public void println(long l) {
print(l);
println();
}
+ @Override
public void println(float f) {
print(f);
println();
}
+ @Override
public void println(double d) {
print(d);
println();
}
+ @Override
public void println(char c[]) {
print(c);
println();
}
+ @Override
public void println(String s) {
print(s);
println();
}
+ @Override
public void println(Object o) {
print(o);
println();
*
* @throws IOException An underlying IOException occurred
*/
+ @Override
public void close()
throws IOException {
closed = true;
}
+ @Override
public int read()
throws IOException {
}
+ @Override
public int read(char[] cbuf)
throws IOException {
}
+ @Override
public int read(char[] cbuf, int off, int len)
throws IOException {
}
+ @Override
public long skip(long n)
throws IOException {
}
+ @Override
public boolean ready()
throws IOException {
}
+ @Override
public boolean markSupported() {
return true;
}
+ @Override
public void mark(int readAheadLimit)
throws IOException {
}
+ @Override
public void reset()
throws IOException {
*
* @throws IOException An underlying IOException occurred
*/
+ @Override
public void close()
throws IOException {
*
* @throws IOException An underlying IOException occurred
*/
+ @Override
public void flush()
throws IOException {
doFlush(true);
// ------------------------------------------------- Chars Handling Methods
+ @Override
public void write(int c)
throws IOException {
}
+ @Override
public void write(char c[])
throws IOException {
}
+ @Override
public void write(char c[], int off, int len)
throws IOException {
/**
* Append a string to the buffer
*/
+ @Override
public void write(String s, int off, int len)
throws IOException {
}
+ @Override
public void write(String s)
throws IOException {
/**
* Prevent cloning the facade.
*/
+ @Override
protected Object clone()
throws CloneNotSupportedException {
throw new CloneNotSupportedException();
/**
* Prevent cloning the facade.
*/
+ @Override
protected Object clone()
throws CloneNotSupportedException {
throw new CloneNotSupportedException();
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ApplicationFilterConfig[");
*
* @param name Name of the attribute to retrieve
*/
+ @Override
public Object getAttribute(String name) {
if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
* Override the <code>getAttributeNames()</code> method of the wrapped
* request.
*/
+ @Override
public Enumeration<String> getAttributeNames() {
return (new AttributeNamesEnumerator());
}
*
* @param name Name of the attribute to remove
*/
+ @Override
public void removeAttribute(String name) {
if (!removeSpecial(name))
* @param name Name of the attribute to set
* @param value Value of the attribute to set
*/
+ @Override
public void setAttribute(String name, Object value) {
if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
*
* @param path Path of the resource to be wrapped
*/
+ @Override
public RequestDispatcher getRequestDispatcher(String path) {
if (context == null)
* Override the <code>getContextPath()</code> method of the wrapped
* request.
*/
+ @Override
public String getContextPath() {
return (this.contextPath);
*
* @param name Name of the requested parameter
*/
+ @Override
public String getParameter(String name) {
parseParameters();
* Override the <code>getParameterMap()</code> method of the
* wrapped request.
*/
+ @Override
public Map<String, String[]> getParameterMap() {
parseParameters();
* Override the <code>getParameterNames()</code> method of the
* wrapped request.
*/
+ @Override
public Enumeration<String> getParameterNames() {
parseParameters();
*
* @param name Name of the requested parameter
*/
+ @Override
public String[] getParameterValues(String name) {
parseParameters();
/**
* Override the <code>getPathInfo()</code> method of the wrapped request.
*/
+ @Override
public String getPathInfo() {
return (this.pathInfo);
* Override the <code>getQueryString()</code> method of the wrapped
* request.
*/
+ @Override
public String getQueryString() {
return (this.queryString);
* Override the <code>getRequestURI()</code> method of the wrapped
* request.
*/
+ @Override
public String getRequestURI() {
return (this.requestURI);
* Override the <code>getRequestURL()</code> method of the wrapped
* request.
*/
+ @Override
public StringBuffer getRequestURL() {
StringBuffer url = new StringBuffer();
* Override the <code>getServletPath()</code> method of the wrapped
* request.
*/
+ @Override
public String getServletPath() {
return (this.servletPath);
* Return the session associated with this Request, creating one
* if necessary.
*/
+ @Override
public HttpSession getSession() {
return (getSession(true));
}
*
* @param create Create a new session if one does not exist
*/
+ @Override
public HttpSession getSession(boolean create) {
if (crossContext) {
* @return true if the request specifies a JSESSIONID that is valid within
* the context of this ApplicationHttpRequest, false otherwise.
*/
+ @Override
public boolean isRequestedSessionIdValid() {
if (crossContext) {
* @exception IllegalStateException if the response has already
* been committed
*/
+ @Override
public void reset() {
// If already committed, the wrapped response will throw ISE
*
* @param len The new content length
*/
+ @Override
public void setContentLength(int len) {
if (!included)
*
* @param type The new content type
*/
+ @Override
public void setContentType(String type) {
if (!included)
*
* @param loc The new locale
*/
+ @Override
public void setLocale(Locale loc) {
if (!included)
*
* @param size The buffer size
*/
+ @Override
public void setBufferSize(int size) {
if (!included)
getResponse().setBufferSize(size);
*
* @param cookie The new cookie
*/
+ @Override
public void addCookie(Cookie cookie) {
if (!included)
* @param name The new header name
* @param value The new header value
*/
+ @Override
public void addDateHeader(String name, long value) {
if (!included)
* @param name The new header name
* @param value The new header value
*/
+ @Override
public void addHeader(String name, String value) {
if (!included)
* @param name The new header name
* @param value The new header value
*/
+ @Override
public void addIntHeader(String name, int value) {
if (!included)
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void sendError(int sc) throws IOException {
if (!included)
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void sendError(int sc, String msg) throws IOException {
if (!included)
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void sendRedirect(String location) throws IOException {
if (!included)
* @param name The new header name
* @param value The new header value
*/
+ @Override
public void setDateHeader(String name, long value) {
if (!included)
* @param name The new header name
* @param value The new header value
*/
+ @Override
public void setHeader(String name, String value) {
if (!included)
* @param name The new header name
* @param value The new header value
*/
+ @Override
public void setIntHeader(String name, int value) {
if (!included)
*
* @param sc The new status code
*/
+ @Override
public void setStatus(int sc) {
if (!included)
*
* @param name Name of the attribute to retrieve
*/
+ @Override
public Object getAttribute(String name) {
synchronized (attributes) {
* Override the <code>getAttributeNames()</code> method of the wrapped
* request.
*/
+ @Override
public Enumeration<String> getAttributeNames() {
synchronized (attributes) {
*
* @param name Name of the attribute to remove
*/
+ @Override
public void removeAttribute(String name) {
synchronized (attributes) {
* @param name Name of the attribute to set
* @param value Value of the attribute to set
*/
+ @Override
public void setAttribute(String name, Object value) {
synchronized (attributes) {
*
* @param request The new wrapped request
*/
+ @Override
public void setRequest(ServletRequest request) {
super.setRequest(request);
* @exception IllegalStateException if the response has already
* been committed
*/
+ @Override
public void reset() {
// If already committed, the wrapped response will throw ISE
*
* @param len The new content length
*/
+ @Override
public void setContentLength(int len) {
if (!included)
*
* @param type The new content type
*/
+ @Override
public void setContentType(String type) {
if (!included)
*
* @param loc The new locale
*/
+ @Override
public void setLocale(Locale loc) {
if (!included)
getResponse().setLocale(loc);
*
* @param size The buffer size
*/
+ @Override
public void setBufferSize(int size) {
if (!included)
getResponse().setBufferSize(size);
*
* @param response The new wrapped response
*/
+ @Override
public void setResponse(ServletResponse response) {
super.setResponse(response);
}
+ @Override
public void setName( String name ) {
super.setName( name );
encodedPath = urlEncoder.encode(name);
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
*
* @param loader The newly associated loader
*/
+ @Override
public synchronized void setLoader(Loader loader) {
super.setLoader(loader);
* This call is meaningful only <strong>after</strong> a Loader has
* been configured.
*/
+ @Override
public ClassLoader getParentClassLoader() {
if (parentClassLoader != null)
return (parentClassLoader);
*
* @param resources The newly associated DirContext
*/
+ @Override
public synchronized void setResources(DirContext resources) {
if (started) {
* @exception IllegalArgumentException if the proposed container is
* not an implementation of Wrapper
*/
+ @Override
public void addChild(Container child) {
// Global JspServlet
* @exception IllegalArgumentException if the proposed container is
* not an implementation of Wrapper
*/
+ @Override
public void removeChild(Container child) {
if (!(child instanceof Wrapper)) {
*
* @exception LifecycleException if a startup error occurs
*/
+ @Override
public synchronized void start() throws LifecycleException {
//if (lazy ) return;
if (started) {
*
* @exception LifecycleException if a shutdown error occurs
*/
+ @Override
public synchronized void stop() throws LifecycleException {
// Validate and update our current component state
* XXX Should this be done in stop() ?
*
*/
+ @Override
public void destroy() throws Exception {
if( oname != null ) {
// Send j2ee.object.deleted notification
/**
* Return a String representation of this component.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
}
+ @Override
public ObjectName createObjectName(String hostDomain, ObjectName parentName)
throws MalformedObjectNameException
{
* @return ObjectName The name of the object
* @throws Exception If an error occurs
*/
+ @Override
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
return super.preRegister(server,name);
}
+ @Override
public void preDeregister() throws Exception {
if( started ) {
try {
}
}
+ @Override
public void init() throws Exception {
if( this.getParent() == null ) {
}
+ @Override
public ObjectName getParentName() throws MalformedObjectNameException {
// "Life" update
String path=oname.getKeyProperty("name");
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
*
* @see org.apache.catalina.Contained#setContainer(org.apache.catalina.Container)
*/
+ @Override
public void setContainer(Container container) {
super.setContainer(container);
context = (StandardContext) container;
* @exception IOException if an input/output error occurred
* @exception ServletException if a servlet error occurred
*/
+ @Override
public final void invoke(Request request, Response response)
throws IOException, ServletException {
* @exception IOException if an input/output error occurred
* @exception ServletException if a servlet error occurred
*/
+ @Override
public final void event(Request request, Response response, CometEvent event)
throws IOException, ServletException {
*
* @return configured realm, or a JAAS realm by default
*/
+ @Override
public Realm getRealm() {
Realm configured=super.getRealm();
// If no set realm has been called - default to JAAS
}
+ @Override
public void setName(String name ) {
if( domain != null ) {
// keep name==domain, ignore override
*
* @param child Child container to be added
*/
+ @Override
public void addChild(Container child) {
if (!(child instanceof Host))
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
*
* @param container Proposed parent Container
*/
+ @Override
public void setParent(Container container) {
throw new IllegalArgumentException
private boolean initialized=false;
+ @Override
public void init() {
if( initialized ) return;
initialized=true;
}
+ @Override
public void destroy() throws LifecycleException {
if( ! initialized ) return;
initialized=false;
*
* @exception LifecycleException if a startup error occurs
*/
+ @Override
public void start() throws LifecycleException {
if( started ) {
return;
}
+ @Override
public void stop() throws LifecycleException {
super.stop();
if( mbeans != null ) {
/**
* Return a String representation of this component.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("StandardEngine[");
// -------------------- JMX registration --------------------
+ @Override
public ObjectName preRegister(MBeanServer server,
ObjectName name) throws Exception
{
}
// FIXME Remove -- not used
+ @Override
public ObjectName getParentName() throws MalformedObjectNameException {
if (getService()==null) {
return null;
return serviceName;
}
+ @Override
public ObjectName createObjectName(String domain, ObjectName parent)
throws Exception
{
}
+ @Override
public String getDomain() {
if (domain!=null) {
return domain;
}
}
+ @Override
public void setDomain(String domain) {
this.domain = domain;
}
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception IOException if an input/output error occurred
* @exception ServletException if a servlet error occurred
*/
+ @Override
public final void invoke(Request request, Response response)
throws IOException, ServletException {
* @exception IOException if an input/output error occurred
* @exception ServletException if a servlet error occurred
*/
+ @Override
public final void event(Request request, Response response, CometEvent event)
throws IOException, ServletException {
* Return the canonical, fully qualified, name of the virtual host
* this Container represents.
*/
+ @Override
public String getName() {
return (name);
*
* @exception IllegalArgumentException if name is null
*/
+ @Override
public void setName(String name) {
if (name == null)
*
* @param child Child container to be added
*/
+ @Override
public void addChild(Container child) {
if (!(child instanceof Context))
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
/**
* Return a String representation of this component.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
* @exception LifecycleException if this component detects a fatal error
* that prevents it from being started
*/
+ @Override
public synchronized void start() throws LifecycleException {
if( started ) {
return;
private boolean initialized=false;
+ @Override
public void init() {
if( initialized ) return;
initialized=true;
}
}
+ @Override
public void destroy() throws Exception {
// destroy our child containers, if any
Container children[] = findChildren();
}
+ @Override
public ObjectName preRegister(MBeanServer server, ObjectName oname )
throws Exception
{
return res;
}
+ @Override
public ObjectName createObjectName(String domain, ObjectName parent)
throws Exception
{
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception IOException if an input/output error occurred
* @exception ServletException if a servlet error occurred
*/
+ @Override
public final void invoke(Request request, Response response)
throws IOException, ServletException {
* @exception IOException if an input/output error occurred
* @exception ServletException if a servlet error occurred
*/
+ @Override
public final void event(Request request, Response response, CometEvent event)
throws IOException, ServletException {
/**
* Return a String representation of this component.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("StandardServer[");
/**
* Return a String representation of this component.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("StandardService[");
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
*
* @param container Proposed parent Container
*/
+ @Override
public void setParent(Container container) {
if ((container != null) &&
* invoked inside the classloading context of this container. Unexpected
* throwables will be caught and logged.
*/
+ @Override
public void backgroundProcess() {
super.backgroundProcess();
*
* @param child Child container to be added
*/
+ @Override
public void addChild(Container child) {
throw new IllegalStateException
/**
* Return a String representation of this component.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
*
* @exception LifecycleException if a fatal error occurs during startup
*/
+ @Override
public void start() throws LifecycleException {
// Send j2ee.state.starting notification
*
* @exception LifecycleException if a fatal error occurs during shutdown
*/
+ @Override
public void stop() throws LifecycleException {
setAvailable(Long.MAX_VALUE);
* @exception IOException if an input/output error occurred
* @exception ServletException if a servlet error occurred
*/
+ @Override
public final void invoke(Request request, Response response)
throws IOException, ServletException {
* @exception ServletException if a servlet error occurs, or is thrown
* by a subsequently invoked Valve, Filter, or Servlet
*/
+ @Override
public void event(Request request, Response response, CometEvent event)
throws IOException, ServletException {
// Don't register in JMX
+ @Override
public ObjectName createObjectName(String domain, ObjectName parent)
throws MalformedObjectNameException
{
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ApplicationParameter[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ContextEjb[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ContextEnvironment[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ContextHandler[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ContextLocalEjb[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ContextResource[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ContextResourceEnvRef[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ContextResourceLink[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ContextService[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("Transaction[");
/**
* Render a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ErrorPage[");
/**
* Render a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("FilterDef[");
/**
* Render a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("FilterMap[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("LoginConfig[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("MessageDestination[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("MessageDestination[");
/**
* Return a String representation of this security collection.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SecurityCollection[");
/**
* Return a String representation of this security constraint.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SecurityConstraint[");
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SecurityRoleRef[");
event, chain);
}
+ @Override
protected Log getLogger() {
return log;
}
event, chain);
}
+ @Override
protected Log getLogger() {
return log;
}
private static final ThreadLocal<Timestamp> timestamp =
new ThreadLocal<Timestamp>() {
+ @Override
protected Timestamp initialValue() {
return new Timestamp();
}
this.cluster = cluster;
}
+ @Override
public boolean equals(Object listener) {
return super.equals(listener);
}
+ @Override
public int hashCode() {
return super.hashCode();
}
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public void addRuleInstances(Digester digester) {
//Cluster configuration start
digester.addObjectCreate(prefix + "Manager",
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
+ @Override
public void start() throws LifecycleException {
super.start();
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
+ @Override
public void stop() throws LifecycleException {
super.stop();
/**
* Return a String rendering of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ClusterSingleSignOn[");
* @param ssoId Single sign on identifier
* @param session Session to be associated
*/
+ @Override
protected void associate(String ssoId, Session session) {
if (cluster != null) {
* @param ssoId Single sign on identifier
* @param session Session to be deregistered
*/
+ @Override
protected void deregister(String ssoId, Session session) {
if (cluster != null) {
*
* @param ssoId Single sign on identifier to deregister
*/
+ @Override
protected void deregister(String ssoId) {
if (cluster != null) {
* @param username Username used to authenticate this user
* @param password Password used to authenticate this user
*/
+ @Override
protected void register(String ssoId, Principal principal, String authType,
String username, String password) {
* @param username the username (if any) used for the authentication
* @param password the password (if any) used for the authentication
*/
+ @Override
protected void update(String ssoId, Principal principal, String authType,
String username, String password) {
* @param ssoId Single sign on identifier from which to remove the session.
* @param session the session to be removed.
*/
+ @Override
protected void removeSession(String ssoId, Session session) {
if (cluster != null) {
* @param myobj
* ClusterMessage - the message received from the cluster
*/
+ @Override
public void messageReceived(ClusterMessage myobj) {
if (myobj != null && myobj instanceof SingleSignOnMessage) {
SingleSignOnMessage msg = (SingleSignOnMessage) myobj;
* invoked. If false is returned, the messageReceived method will
* not be invoked.
*/
+ @Override
public boolean accept(ClusterMessage msg) {
return (msg instanceof SingleSignOnMessage);
}
/**
* Return a String rendering of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SingleSignOnMessage[action=");
}
}
+ @Override
public ServletContext getServletContext() {
if (context == null) {
context = new ReplApplContext(getBasePath(), this);
return (ReplicatedContext)getContext();
}
+ @Override
protected ServletContext getFacade() {
return super.getFacade();
}
this.attributes = map;
}
+ @Override
public void removeAttribute(String name) {
tomcatAttributes.remove(name);
//do nothing
super.removeAttribute(name);
}
+ @Override
public void setAttribute(String name, Object value) {
if ( (!getParent().startComplete) || "org.apache.jasper.runtime.JspApplicationContextImpl".equals(name) ){
tomcatAttributes.put(name,value);
super.setAttribute(name,value);
}
+ @Override
public Object getAttribute(String name) {
if (tomcatAttributes.containsKey(name) )
return tomcatAttributes.get(name);
return super.getAttribute(name);
}
+ @Override
public Enumeration<String> getAttributeNames() {
return new MultiEnumeration<String>(new Enumeration[] {super.getAttributeNames(),new Enumerator<String>(tomcatAttributes.keySet(), true)});
}
* @param msg
* ClusterMessage - the message received from the cluster
*/
+ @Override
public void messageReceived(ClusterMessage msg) {
try {
if (msg instanceof FileMessage) {
* invoked. If false is returned, the messageReceived method will
* not be invoked.
*/
+ @Override
public boolean accept(ClusterMessage msg) {
return (msg instanceof FileMessage) || (msg instanceof UndeployMessage);
}
}
/*--Instance Getters/Setters--------------------------------*/
+ @Override
public CatalinaCluster getCluster() {
return cluster;
}
+ @Override
public void setCluster(CatalinaCluster cluster) {
this.cluster = cluster;
}
+ @Override
public boolean equals(Object listener) {
return super.equals(listener);
}
+ @Override
public int hashCode() {
return super.hashCode();
}
this.totalLength = totalLength;
}
+ @Override
public String getUniqueId() {
StringBuilder result = new StringBuilder(getFileName());
result.append("#-#");
return war;
}
+ @Override
public int hashCode() {
return war.getAbsolutePath().hashCode();
}
+ @Override
public boolean equals(Object other) {
if (other instanceof WarInfo) {
WarInfo wo = (WarInfo) other;
/**
* Override persistence since they don't go hand in hand with replication for now.
*/
+ @Override
public void unload() throws IOException {
}
}
}
+ @Override
public Session createEmptySession() {
return new DeltaSession(this);
}
+ @Override
public String getName() {
return this.name;
}
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
+ @Override
public void start() throws LifecycleException {
if ( this.started ) return;
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
+ @Override
public void stop() throws LifecycleException
{
}
+ @Override
public void setDistributable(boolean dist) {
this.distributable = dist;
}
+ @Override
public boolean getDistributable() {
return distributable;
}
* @param myobj
* ClusterMessage - the message received from the cluster
*/
+ @Override
public void messageReceived(ClusterMessage myobj) {
if (myobj != null && myobj instanceof SessionMessage) {
SessionMessage msg = (SessionMessage) myobj;
* invoked. If false is returned, the messageReceived method will
* not be invoked.
*/
+ @Override
public boolean accept(ClusterMessage msg) {
return (msg instanceof SessionMessage);
}
* corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return info;
}
/**
* Return the descriptive short name of this Manager implementation.
*/
+ @Override
public String getName() {
return name;
}
/**
* @return Returns the processingTime.
*/
+ @Override
public long getProcessingTime() {
return processingTime;
}
* @param container
* The associated Container
*/
+ @Override
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
* @exception IllegalStateException
* if a new session cannot be instantiated for any reason
*/
+ @Override
public Session createSession(String sessionId) {
return createSession(sessionId, true);
}
* Create DeltaSession
* @see org.apache.catalina.Manager#createEmptySession()
*/
+ @Override
public Session createEmptySession() {
return getNewDeltaSession() ;
}
public Object getValue() {
return value;
}
+ @Override
public int hashCode() {
return name.hashCode();
}
action=-1;
}
+ @Override
public boolean equals(Object o) {
if ( ! (o instanceof AttributeInfo ) ) return false;
AttributeInfo other = (AttributeInfo)o;
if (getValue()!=null) out.writeObject(getValue());
}
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder("AttributeInfo[type=");
buf.append(getType()).append(", action=").append(getAction());
* @param id
* The new session identifier
*/
+ @Override
public void setId(String id) {
super.setId(id);
resetDeltaRequest();
}
+ @Override
public void setMaxInactiveInterval(int interval) {
this.setMaxInactiveInterval(interval,true);
}
* @param isNew
* The new value for the <code>isNew</code> flag
*/
+ @Override
public void setNew(boolean isNew) {
setNew(isNew, true);
}
* @param principal
* The new Principal, or <code>null</code> if none
*/
+ @Override
public void setPrincipal(Principal principal) {
setPrincipal(principal, true);
}
/**
* Return the <code>isValid</code> flag for this session.
*/
+ @Override
public boolean isValid() {
if (this.expiring) {
return true;
/**
* End the access and register to ReplicationValve (crossContext support)
*/
+ @Override
public void endAccess() {
super.endAccess() ;
if(manager instanceof DeltaManager) {
* @param notify
* Should we notify listeners about the demise of this session?
*/
+ @Override
public void expire(boolean notify) {
expire(notify, true);
}
* Release all object references, and initialize instance variables, in
* preparation for reuse of this object.
*/
+ @Override
public void recycle() {
try {
lock();
/**
* Return a string representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("DeltaSession[");
* @exception IllegalStateException
* if this method is called on an invalidated session
*/
+ @Override
public void removeAttribute(String name, boolean notify) {
removeAttribute(name, notify, true);
}
* @exception IllegalStateException
* if this method is called on an invalidated session
*/
+ @Override
public void setAttribute(String name, Object value) {
setAttribute(name, value, true, true);
}
* @exception IOException
* if an input/output error occurs
*/
+ @Override
protected void writeObject(ObjectOutputStream stream) throws IOException {
writeObject((ObjectOutput)stream);
}
/**
* Return descriptive information about this implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception ServletException
* if a servlet error has occurred
*/
+ @Override
public void invoke(Request request, Response response) throws IOException,
ServletException {
* @param msg
* ClusterMessage - the message received from the cluster
*/
+ @Override
public void messageReceived(ClusterMessage msg) {
if (msg instanceof SessionIDMessage) {
SessionIDMessage sessionmsg = (SessionIDMessage) msg;
* invoked. If false is returned, the messageReceived method will
* not be invoked.
*/
+ @Override
public boolean accept(ClusterMessage msg) {
return (msg instanceof SessionIDMessage);
}
}
+ @Override
public void removeAttribute(String name) {
setIsDirty(true);
super.removeAttribute(name);
* see parent description,
* plus we also notify other nodes in the cluster
*/
+ @Override
public void removeAttribute(String name, boolean notify) {
setIsDirty(true);
super.removeAttribute(name,notify);
/**
* Sets an attribute and notifies the other nodes in the cluster
*/
+ @Override
public void setAttribute(String name, Object value)
{
if ( value == null ) {
super.setAttribute(name,value);
}
+ @Override
public void setMaxInactiveInterval(int interval) {
setIsDirty(true);
super.setMaxInactiveInterval(interval);
*
* @param principal The new Principal, or <code>null</code> if none
*/
+ @Override
public void setPrincipal(Principal principal) {
super.setPrincipal(principal);
setIsDirty(true);
}
+ @Override
public void expire() {
SimpleTcpReplicationManager mgr =(SimpleTcpReplicationManager)getManager();
mgr.sessionInvalidated(getIdInternal());
super.expire();
}
+ @Override
public void invalidate() {
SimpleTcpReplicationManager mgr =(SimpleTcpReplicationManager)getManager();
mgr.sessionInvalidated(getIdInternal());
* @exception ClassNotFoundException if an unknown class is specified
* @exception IOException if an input/output error occurs
*/
+ @Override
public void readObjectData(ObjectInputStream stream)
throws ClassNotFoundException, IOException {
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void writeObjectData(ObjectOutputStream stream)
throws IOException {
}
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder("ReplicatedSession id=");
buf.append(getIdInternal()).append(" ref=").append(super.toString()).append("\n");
public void setAccessCount(int accessCount) {
this.accessCount.set(accessCount);
}
+ @Override
public long getLastAccessedTime() {
return lastAccessedTime;
}
public void setLastAccessedTime(long lastAccessedTime) {
this.lastAccessedTime = lastAccessedTime;
}
+ @Override
public long getThisAccessedTime() {
return thisAccessedTime;
}
* Return a String representation of this object, which exposes only
* information that should be public.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SerializablePrincipal[");
private String host ;
private String contextPath;
- public String getUniqueId() {
+ @Override
+ public String getUniqueId() {
StringBuilder result = new StringBuilder(getOrignalSessionID());
result.append("#-#");
result.append(getHost());
this.orignalSessionID = orignalSessionID;
}
- public String toString() {
+ @Override
+ public String toString() {
return "SESSIONID-UPDATE#" + getHost() + "." + getContextPath() + "#" + getOrignalSessionID() + ":" + getBackupSessionID();
}
/**
* set message send time but only the first setting works (one shot)
*/
+ @Override
public void setTimestamp(long time) {
synchronized(this) {
if(!timestampSet) {
}
}
+ @Override
public long getTimestamp() { return serializationTimestamp;}
/**
public String getContextName() {
return mContextName;
}
+ @Override
public String getUniqueId() {
return uniqueId;
}
+ @Override
public void setUniqueId(String uniqueId) {
this.uniqueId = uniqueId;
}
+ @Override
public String toString() {
return getEventTypeString() + "#" + getContextName() + "#" + getSessionID() ;
}
/**
* Override persistence since they don't go hand in hand with replication for now.
*/
+ @Override
public void unload() throws IOException {
if ( !getDistributable() ) {
super.unload();
* @exception IllegalStateException if a new session cannot be
* instantiated for any reason
*/
+ @Override
public Session createSession(String sessionId)
{
//create a session and notify the other nodes in the cluster
return null;
}
+ @Override
public String getName() {
return this.name;
}
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
+ @Override
public void start() throws LifecycleException {
mManagerRunning = true;
super.start();
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
+ @Override
public void stop() throws LifecycleException
{
mManagerRunning = false;
}
}
+ @Override
public void setDistributable(boolean dist) {
this.distributable = dist;
}
+ @Override
public boolean getDistributable() {
return distributable;
}
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException
{
/**
* Return a String rendering of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ReplicationValve[");
/**
* Return a String representation of this component.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("WebappLoader[");
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
/**
* @see javax.servlet.Servlet#getServletInfo()
*/
+ @Override
public String getServletInfo() {
return "HTMLManagerServlet, Copyright (c) The Apache Software Foundation";
}
/**
* @see javax.servlet.GenericServlet#init()
*/
+ @Override
public void init() throws ServletException {
super.init();
}
Comparator<Session> comparator = null;
if ("CreationTime".equalsIgnoreCase(sortBy)) {
comparator = new BaseSessionComparator<Date>() {
+ @Override
public Comparable<Date> getComparableObject(Session session) {
return new Date(session.getCreationTime());
}
};
} else if ("id".equalsIgnoreCase(sortBy)) {
comparator = new BaseSessionComparator<String>() {
+ @Override
public Comparable<String> getComparableObject(Session session) {
return session.getId();
}
};
} else if ("LastAccessedTime".equalsIgnoreCase(sortBy)) {
comparator = new BaseSessionComparator<Date>() {
+ @Override
public Comparable<Date> getComparableObject(Session session) {
return new Date(session.getLastAccessedTime());
}
};
} else if ("MaxInactiveInterval".equalsIgnoreCase(sortBy)) {
comparator = new BaseSessionComparator<Date>() {
+ @Override
public Comparable<Date> getComparableObject(Session session) {
return new Date(session.getMaxInactiveInterval());
}
};
} else if ("new".equalsIgnoreCase(sortBy)) {
comparator = new BaseSessionComparator<Boolean>() {
+ @Override
public Comparable<Boolean> getComparableObject(Session session) {
return Boolean.valueOf(session.getSession().isNew());
}
};
} else if ("locale".equalsIgnoreCase(sortBy)) {
comparator = new BaseSessionComparator<String>() {
+ @Override
public Comparable<String> getComparableObject(Session session) {
return JspHelper.guessDisplayLocaleFromSession(session);
}
};
} else if ("user".equalsIgnoreCase(sortBy)) {
comparator = new BaseSessionComparator<String>() {
+ @Override
public Comparable<String> getComparableObject(Session session) {
return JspHelper.guessDisplayUserFromSession(session);
}
};
} else if ("UsedTime".equalsIgnoreCase(sortBy)) {
comparator = new BaseSessionComparator<Date>() {
+ @Override
public Comparable<Date> getComparableObject(Session session) {
return new Date(SessionUtils.getUsedTimeForSession(session));
}
};
} else if ("InactiveTime".equalsIgnoreCase(sortBy)) {
comparator = new BaseSessionComparator<Date>() {
+ @Override
public Comparable<Date> getComparableObject(Session session) {
return new Date(SessionUtils.getInactiveTimeForSession(session));
}
};
} else if ("TTL".equalsIgnoreCase(sortBy)) {
comparator = new BaseSessionComparator<Date>() {
+ @Override
public Comparable<Date> getComparableObject(Session session) {
return new Date(SessionUtils.getTTLForSession(session));
}
/**
* Initialize this servlet.
*/
+ @Override
public void init() throws ServletException {
// Retrieve the MBean server
registry = Registry.getRegistry(null, null);
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
/**
* Finalize this servlet.
*/
+ @Override
public void destroy() {
// No actions necessary
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
public void doPut(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
/**
* Initialize this servlet.
*/
+ @Override
public void init() throws ServletException {
// Ensure that our ContainerServlet properties have been set
/**
* Initialize this servlet.
*/
+ @Override
public void init() throws ServletException {
// Retrieve the MBean server
/**
* Finalize this servlet.
*/
+ @Override
public void destroy() {
// No actions necessary
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
/**
* Finalize this servlet.
*/
+ @Override
public void destroy() {
// No actions necessary
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
/**
* Initialize this servlet.
*/
+ @Override
public void init() throws ServletException {
// Ensure that our ContainerServlet properties have been set
* Return the fully qualified Java class name of the managed object
* for this MBean.
*/
- public String getClassName() {
+ @Override
+ public String getClassName() {
return (this.resource.getClass().getName());
* @exception ReflectionException if a Java reflection exception
* occurs when invoking the getter
*/
+ @Override
public Object getAttribute(String name) throws AttributeNotFoundException,
MBeanException, ReflectionException {
* @exception ReflectionException if a Java reflection exception
* occurs when invoking the getter
*/
- public void setAttribute(Attribute attribute)
+ @Override
+ public void setAttribute(Attribute attribute)
throws AttributeNotFoundException, MBeanException,
ReflectionException {
* @exception ReflectionException if a Java reflection exception
* occurs when invoking the getter
*/
- public void setAttribute(Attribute attribute)
+ @Override
+ public void setAttribute(Attribute attribute)
throws AttributeNotFoundException, MBeanException,
ReflectionException {
* @exception ReflectionException if a Java reflection exception
* occurs when invoking the getter
*/
- public void setAttribute(Attribute attribute)
+ @Override
+ public void setAttribute(Attribute attribute)
throws AttributeNotFoundException, MBeanException,
ReflectionException {
* @exception ReflectionException if a Java reflection exception
* occurs when invoking the getter
*/
+ @Override
public Object getAttribute(String name)
throws AttributeNotFoundException, MBeanException,
ReflectionException {
* @exception ReflectionException if a Java reflection exception
* occurs when invoking the getter
*/
- public void setAttribute(Attribute attribute)
+ @Override
+ public void setAttribute(Attribute attribute)
throws AttributeNotFoundException, MBeanException,
ReflectionException {
* @param credentials Password or other credentials to use in
* authenticating this username
*/
+ @Override
public Principal authenticate(String username, byte[] credentials) {
Principal authenticatedUser = null;
* @param md5a2 Second MD5 digest used to calculate the digest :
* MD5(Method + ":" + uri)
*/
+ @Override
public Principal authenticate(String username, String clientDigest,
String once, String nc, String cnonce, String qop,
String realmName, String md5a2) {
* @param credentials Password or other credentials to use in
* authenticating this username
*/
+ @Override
public Principal authenticate(String username, String credentials) {
Principal authenticatedUser = null;
*
* @param container The associated Container
*/
+ @Override
public void setContainer(Container container) {
for(Realm realm : realms) {
// Set the realmPath for JMX naming
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
+ @Override
public void start() throws LifecycleException {
// Start 'sub-realms' then this one
for (Realm realm : realms) {
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
- public void stop() throws LifecycleException {
+ @Override
+ public void stop() throws LifecycleException {
// Stop this realm, then the sub-realms (reverse order to start)
super.stop();
for (Realm realm : realms) {
* @param certs Array of client certificates, with the first one in
* the array being the certificate of the client itself.
*/
+ @Override
public Principal authenticate(X509Certificate[] certs) {
Principal authenticatedUser = null;
String username = null;
* @param credentials Password or other credentials to use in
* authenticating this username
*/
+ @Override
public Principal authenticate(String username, String credentials) {
// No user or no credentials
/**
* Return a short name for this Realm implementation.
*/
+ @Override
protected String getName() {
return (name);
/**
* Return the password associated with the given principal's user name.
*/
+ @Override
protected String getPassword(String username) {
Connection dbConnection = null;
/**
* Return the Principal associated with the given user name.
*/
+ @Override
protected Principal getPrincipal(String username) {
Connection dbConnection = open();
if (dbConnection == null) {
* @exception LifecycleException if this component detects a fatal error
* that prevents it from being started
*/
+ @Override
public void start() throws LifecycleException {
// Perform normal superclass initialization
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
+ @Override
public void stop() throws LifecycleException {
// Perform normal superclass finalization
* Return a String representation of this object, which exposes only
* information that should be public.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("GenericPrincipal[");
* @param request Request we are processing
* @param context Context the Request is mapped to
*/
+ @Override
public SecurityConstraint [] findSecurityConstraints(Request request,
Context context) {
ArrayList<SecurityConstraint> results = null;
return useContextClassLoader;
}
+ @Override
public void setContainer(Container container) {
super.setContainer(container);
* @param credentials Password or other credentials to use in
* authenticating this username
*/
+ @Override
public Principal authenticate(String username, String credentials) {
return authenticate(username,
new JAASCallbackHandler(this, username, credentials));
* @param md5a2 Second MD5 digest used to calculate the digest
* MD5(Method + ":" + uri)
*/
+ @Override
public Principal authenticate(String username, String clientDigest,
String nonce, String nc, String cnonce, String qop,
String realmName, String md5a2) {
/**
* Return a short name for this <code>Realm</code> implementation.
*/
+ @Override
protected String getName() {
return (name);
* always returns null as the JAASRealm has no way of obtaining this
* information.
*/
+ @Override
protected String getPassword(String username) {
return (null);
/**
* Return the <code>Principal</code> associated with the given user name.
*/
+ @Override
protected Principal getPrincipal(String username) {
return authenticate(username,
* @exception LifecycleException if this component detects a fatal error
* that prevents it from being started
*/
+ @Override
public void start() throws LifecycleException {
// Perform normal superclass initialization
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
+ @Override
public void stop() throws LifecycleException {
// Perform normal superclass finalization
* @param credentials Password or other credentials to use in
* authenticating this username
*/
+ @Override
public synchronized Principal authenticate(String username, String credentials) {
// Number of tries is the numebr of attempts to connect to the database
/**
* Return a short name for this Realm implementation.
*/
+ @Override
protected String getName() {
return (name);
/**
* Return the password associated with the given principal's user name.
*/
+ @Override
protected synchronized String getPassword(String username) {
// Look up the user's credentials
/**
* Return the Principal associated with the given user name.
*/
+ @Override
protected synchronized Principal getPrincipal(String username) {
return (new GenericPrincipal(username,
* @exception LifecycleException if this component detects a fatal error
* that prevents it from being started
*/
+ @Override
public void start() throws LifecycleException {
// Perform normal superclass initialization
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
+ @Override
public void stop() throws LifecycleException {
// Perform normal superclass finalization
* @param credentials Password or other credentials to use in
* authenticating this username
*/
+ @Override
public Principal authenticate(String username, String credentials) {
DirContext context = null;
/**
* Return a short name for this Realm implementation.
*/
+ @Override
protected String getName() {
return (name);
/**
* Return the password associated with the given principal's user name.
*/
+ @Override
protected String getPassword(String username) {
return (null);
/**
* Return the Principal associated with the given user name.
*/
+ @Override
protected Principal getPrincipal(String username) {
DirContext context = null;
* @exception LifecycleException if this component detects a fatal error
* that prevents it from being started
*/
+ @Override
public void start() throws LifecycleException {
// Perform normal superclass initialization
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
+ @Override
public void stop() throws LifecycleException {
// Perform normal superclass finalization
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
+ @Override
public void start() throws LifecycleException {
// Configure the list of failed users to delete the oldest entry once it
// exceeds the specified size
failedUsers = new LinkedHashMap<String, LockRecord>(cacheSize, 0.75f,
true) {
+ @Override
protected boolean removeEldestEntry(
Map.Entry<String, LockRecord> eldest) {
if (size() > cacheSize) {
* @param credentials Password or other credentials to use in
* authenticating this username
*/
+ @Override
public Principal authenticate(String username, byte[] credentials) {
if (isLocked(username)) {
// Trying to authenticate a locked user is an automatic failure
* @param md5a2 Second MD5 digest used to calculate the digest :
* MD5(Method + ":" + uri)
*/
+ @Override
public Principal authenticate(String username, String clientDigest,
String once, String nc, String cnonce, String qop,
String realmName, String md5a2) {
* @param credentials Password or other credentials to use in
* authenticating this username
*/
+ @Override
public Principal authenticate(String username, String credentials) {
if (isLocked(username)) {
// Trying to authenticate a locked user is an automatic failure
* @param certs Array of client certificates, with the first one in
* the array being the certificate of the client itself.
*/
+ @Override
public Principal authenticate(X509Certificate[] certs) {
String username = null;
if (certs != null && certs.length >0) {
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return info;
* @param credentials Password or other credentials to use in
* authenticating this username
*/
+ @Override
public Principal authenticate(String username, String credentials) {
GenericPrincipal principal = principals.get(username);
/**
* Return a short name for this Realm implementation.
*/
+ @Override
protected String getName() {
return (name);
/**
* Return the password associated with the given principal's user name.
*/
+ @Override
protected String getPassword(String username) {
GenericPrincipal principal = principals.get(username);
/**
* Return the Principal associated with the given user name.
*/
+ @Override
protected Principal getPrincipal(String username) {
return principals.get(username);
* @exception LifecycleException if this component detects a fatal error
* that prevents it from being started
*/
+ @Override
public synchronized void start() throws LifecycleException {
// Perform normal superclass initialization
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
+ @Override
public synchronized void stop() throws LifecycleException {
// Perform normal superclass finalization
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public void addRuleInstances(Digester digester) {
digester.addRule(prefix + "user", new MemoryUserRule());
*
* @param attributes The attribute list for this element
*/
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
this.name = name;
}
+ @Override
public boolean equals(Object o)
{
boolean equals = false;
}
return equals;
}
+ @Override
public int hashCode()
{
return name.hashCode();
}
+ @Override
public String toString()
{
return name;
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return info;
* @param principal Principal for whom the role is to be checked
* @param role Security role to be checked
*/
+ @Override
public boolean hasRole(Principal principal, String role) {
if( principal instanceof GenericPrincipal) {
GenericPrincipal gp = (GenericPrincipal)principal;
/**
* Return a short name for this Realm implementation.
*/
+ @Override
protected String getName() {
return (name);
/**
* Return the password associated with the given principal's user name.
*/
+ @Override
protected String getPassword(String username) {
User user = database.findUser(username);
/**
* Return the Principal associated with the given user name.
*/
+ @Override
protected Principal getPrincipal(String username) {
User user = database.findUser(username);
* @exception LifecycleException if this component detects a fatal error
* that prevents it from being started
*/
+ @Override
public synchronized void start() throws LifecycleException {
// Perform normal superclass initialization
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
+ @Override
public synchronized void stop() throws LifecycleException {
// Perform normal superclass finalization
* interferes with the servlet's normal
* operation
*/
+ @Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
* @see javax.servlet.http.HttpServlet
*
*/
+ @Override
protected void doPost(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
doGet(req, res);
* @see javax.servlet.http.HttpServlet
*
*/
+ @Override
protected void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
* @return HTML string containing CGI environment info
*
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
final BufferedReader stdErrRdr = commandsStdErr ;
new Thread() {
+ @Override
public void run () {
sendToLog(stdErrRdr) ;
}
/**
* @see java.io.InputStream#read()
*/
+ @Override
public int read() throws IOException {
if (state == STATE_HEADER_END) {
return -1;
/**
* Finalize this servlet.
*/
+ @Override
public void destroy() {
// NOOP
}
/**
* Initialize this servlet.
*/
+ @Override
public void init() throws ServletException {
if (getServletConfig().getInitParameter("debug") != null)
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
protected void doHead(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
* @exception ServletException if the request for the
* OPTIONS cannot be handled
*/
+ @Override
protected void doOptions(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
protected void doPut(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
protected void doDelete(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
/**
* Initialize this servlet.
*/
+ @Override
public void init()
throws ServletException {
/**
* Handles the special WebDAV methods.
*/
+ @Override
protected void service(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
* and false if any of the conditions is not satisfied, in which case
* request processing is stopped
*/
+ @Override
protected boolean checkIfHeaders(HttpServletRequest request,
HttpServletResponse response,
ResourceAttributes resourceAttributes)
*
* @param request The servlet request we are processing
*/
+ @Override
protected String getRelativePath(HttpServletRequest request) {
// Are we being processed by a RequestDispatcher.include()?
if (request.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) {
* @throws ServletException If an error occurs
* @throws IOException If an IO error occurs
*/
+ @Override
protected void doOptions(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
/**
* DELETE Method.
*/
+ @Override
protected void doDelete(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet-specified error occurs
*/
+ @Override
protected void doPut(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
/**
* Get a String representation of this lock token.
*/
+ @Override
public String toString() {
String result = "Type:" + type + "\n";
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
/**
* Return the name for this Store, used for logging.
*/
+ @Override
public String getStoreName() {
return(storeName);
}
/**
* Return the info for this Store.
*/
+ @Override
public String getInfo() {
return (info);
}
/**
* Return the name for this Store, used for logging.
*/
+ @Override
public String getStoreName() {
return (storeName);
}
/**
* Called once when this Store is first started.
*/
+ @Override
public void start() throws LifecycleException {
super.start();
* Called once when this Store is stopping.
*
*/
+ @Override
public void stop() throws LifecycleException {
super.stop();
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
/**
* Return the descriptive short name of this Manager implementation.
*/
+ @Override
public String getName() {
return (name);
* @param container
* The associated Container
*/
+ @Override
public void setContainer(Container container) {
// De-register from the old Container (if any)
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
/**
* Return the descriptive short name of this Manager implementation.
*/
+ @Override
public String getName() {
return (name);
/**
* Implements the Manager interface, direct call to processExpires and processPersistenceChecks
*/
- public void processExpires() {
+ @Override
+ public void processExpires() {
long timeNow = System.currentTimeMillis();
Session sessions[] = findSessions();
* @exception IOException if an input/output error occurs while
* processing this request
*/
+ @Override
public Session findSession(String id) throws IOException {
Session session = super.findSession(id);
*
* @param session Session to be removed
*/
+ @Override
public void remove(Session session) {
super.remove (session);
*
* @param container The associated Container
*/
+ @Override
public void setContainer(Container container) {
// De-register from the old Container (if any)
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
/**
* Return the descriptive short name of this Manager implementation.
*/
+ @Override
public String getName() {
return (name);
* @exception IllegalStateException if a new session cannot be
* instantiated for any reason
*/
+ @Override
public Session createSession(String sessionId) {
if ((maxActiveSessions >= 0) &&
/**
* Return a string representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
*
* @param b The parameter to write
*/
+ @Override
public void write(int b) {
buf.write(b);
}
/**
* Returns true if the string is not empty.
*/
+ @Override
public boolean evaluate() {
return !(getValue().length() == 0);
}
+ @Override
public String toString() {
return value.toString();
}
}
}
private final class NotNode extends OppNode {
+ @Override
public boolean evaluate() {
return !left.evaluate();
}
+ @Override
public int getPrecedence() {
return PRECEDENCE_NOT;
}
/**
* Overridden to pop only one value.
*/
+ @Override
public void popValues(List<Node> values) {
left = values.remove(0);
}
+ @Override
public String toString() {
return left + " NOT";
}
}
private final class AndNode extends OppNode {
+ @Override
public boolean evaluate() {
if (!left.evaluate()) // Short circuit
return false;
}
+ @Override
public int getPrecedence() {
return PRECEDENCE_LOGICAL;
}
+ @Override
public String toString() {
return left + " " + right + " AND";
}
}
private final class OrNode extends OppNode {
+ @Override
public boolean evaluate() {
if (left.evaluate()) // Short circuit
return true;
}
+ @Override
public int getPrecedence() {
return PRECEDENCE_LOGICAL;
}
+ @Override
public String toString() {
return left + " " + right + " OR";
}
}
}
private final class EqualNode extends CompareNode {
+ @Override
public boolean evaluate() {
return (compareBranches() == 0);
}
+ @Override
public int getPrecedence() {
return PRECEDENCE_COMPARE;
}
+ @Override
public String toString() {
return left + " " + right + " EQ";
}
}
private final class GreaterThanNode extends CompareNode {
+ @Override
public boolean evaluate() {
return (compareBranches() > 0);
}
+ @Override
public int getPrecedence() {
return PRECEDENCE_COMPARE;
}
+ @Override
public String toString() {
return left + " " + right + " GT";
}
}
private final class LessThanNode extends CompareNode {
+ @Override
public boolean evaluate() {
return (compareBranches() < 0);
}
+ @Override
public int getPrecedence() {
return PRECEDENCE_COMPARE;
}
+ @Override
public String toString() {
return left + " " + right + " LT";
}
* @exception java.io.IOException
* if the outputstream already been called
*/
+ @Override
public PrintWriter getWriter() throws java.io.IOException {
if (servletOutputStream == null) {
if (printWriter == null) {
* @exception java.io.IOException
* if the printwriter already been called
*/
+ @Override
public ServletOutputStream getOutputStream() throws java.io.IOException {
if (printWriter == null) {
if (servletOutputStream == null) {
* @return the content type of the resource referenced by this
* <code>ResponseIncludeWrapper</code>, or <code>null</code> if not known.
*/
+ @Override
public String getContentType() {
if (contentType == null) {
String url = request.getRequestURI();
*
* @param mime a mime type
*/
+ @Override
public void setContentType(String mime) {
contentType = mime;
if (contentType != null) {
}
+ @Override
public void addDateHeader(String name, long value) {
super.addDateHeader(name, value);
String lname = name.toLowerCase();
}
}
+ @Override
public void addHeader(String name, String value) {
super.addHeader(name, value);
String lname = name.toLowerCase();
}
}
+ @Override
public void setDateHeader(String name, long value) {
super.setDateHeader(name, value);
String lname = name.toLowerCase();
}
}
+ @Override
public void setHeader(String name, String value) {
super.setHeader(name, value);
String lname = name.toLowerCase();
* @exception ServletException
* if an error occurs
*/
+ @Override
public void init() throws ServletException {
if (getServletConfig().getInitParameter("debug") != null)
* @exception ServletException
* if an error occurs
*/
+ @Override
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
if (debug > 0) log("SSIServlet.doGet()");
* @exception ServletException
* if an error occurs
*/
+ @Override
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
if (debug > 0) log("SSIServlet.doPost()");
*
* @param server The new server
*/
+ @Override
public void setServer(Server server) {
this.server = server;
}
+ @Override
public void destroy() {
}
/**
* Start a new server instance.
*/
+ @Override
public void start() {
if (server == null) {
/**
* Stop an existing server instance.
*/
+ @Override
public void stop() {
try {
*/
protected class CatalinaShutdownHook extends Thread {
+ @Override
public void run() {
if (server != null) {
ClassLoader parentClassLoader = null;
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public void addRuleInstances(Digester digester) {
//Cluster configuration start
digester.addObjectCreate(prefix + "Membership",
* the element name otherwise
* @param attributes The attribute list for this element
*/
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
Service svc = (Service)digester.peek();
* @param name the local name if the parser is namespace aware, or just
* the element name otherwise
*/
+ @Override
public void end(String namespace, String name) throws Exception {
digester.pop();
}
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public void addRuleInstances(Digester digester) {
if (create) {
*
* @exception Exception if a processing error occurs
*/
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
*
* @exception IllegalStateException if no engines have been added yet
*/
+ @Override
public synchronized void addConnector(Connector connector) {
if( log.isDebugEnabled() ) {
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
*
* @param listener The listener to add
*/
+ @Override
public void addLifecycleListener(LifecycleListener listener) {
lifecycle.addLifecycleListener(listener);
* Get the lifecycle listeners associated with this lifecycle. If this
* Lifecycle has no listeners registered, a zero-length array is returned.
*/
+ @Override
public LifecycleListener[] findLifecycleListeners() {
return lifecycle.findLifecycleListeners();
*
* @param listener The listener to remove
*/
+ @Override
public void removeLifecycleListener(LifecycleListener listener) {
lifecycle.removeLifecycleListener(listener);
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
+ @Override
public void start() throws LifecycleException {
if( log.isInfoEnabled() )
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
+ @Override
public void stop() throws LifecycleException {
if( log.isDebugEnabled() )
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Engine",
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Host",
*
* @exception Exception if a processing error occurs
*/
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Ejb",
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Realm",
*
* @exception Exception if a processing error occurs
*/
+ @Override
public void begin(String namespace, String nameX, Attributes attributes)
throws Exception {
*
* @exception Exception if a processing error occurs
*/
+ @Override
public void begin(String namespace, String nameX, Attributes attributes)
throws Exception {
* @param name the local name if the parser is namespace aware, or just
* the element name otherwise
*/
+ @Override
public void end(String namespace, String name) throws Exception {
// Identify the objects to be used
/**
* Render a printable version of this Rule.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SetNextRule[");
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public void addRuleInstances(Digester digester) {
// Note the sharing of state between rules
this.taglibUriRule = taglibUriRule;
}
+ @Override
public void body(String namespace, String name, String text)
throws Exception {
taglibUriRule.setDuplicateUri(false);
public ExistingStandardWrapper( Servlet existing ) {
this.existing = existing;
}
+ @Override
public synchronized Servlet loadServlet() throws ServletException {
if (!init) {
existing.init(facade);
return existing;
}
+ @Override
public long getAvailable() {
return 0;
}
+ @Override
public boolean isUnavailable() {
return false;
}
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public void addRuleInstances(Digester digester) {
sessionConfig = new SetSessionConfig();
jspConfig = new SetJspConfig();
public SetLoginConfig() {
}
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
if (isLoginConfigSet){
public SetJspConfig() {
}
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
if (isJspConfigSet){
public SetSessionConfig() {
}
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
if (isSessionConfigSet){
public SetAuthConstraintRule() {
}
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
SecurityConstraint securityConstraint =
public SetDistributableRule() {
}
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
WebXml webXml = (WebXml) digester.peek();
private String method = null;
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
public ServletDefCreateRule() {
}
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
ServletDef servletDef = new ServletDef();
digester.getLogger().debug("new " + servletDef.getClass().getName());
}
+ @Override
public void end(String namespace, String name)
throws Exception {
ServletDef servletDef = (ServletDef) digester.pop();
super(paramIndex);
}
+ @Override
public void end(String namespace, String name) {
if (bodyTextStack != null && !bodyTextStack.empty()) {
// what we do now is push one parameter onto the top set of parameters
* @param name the local name if the parser is namespace aware, or just
* the element name otherwise
*/
+ @Override
public void end(String namespace, String name) throws Exception {
// Retrieve or construct the parameter values array
public IgnoreAnnotationsRule() {
}
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
WebXml webxml = (WebXml) digester.peek(digester.getCount() - 1);
public AbsoluteOrderingRule() {
}
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
digester.getLogger().warn(
public RelativeOrderingRule() {
}
+ @Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
digester.getLogger().warn(
* the element name otherwise
* @param bodyText The body text of this element
*/
+ @Override
public void body(String namespace, String name, String text)
throws Exception {
String namespaceuri = null;
* the element name otherwise
* @param bodyText The body text of this element
*/
+ @Override
public void body(String namespace, String name, String text)
throws Exception {
String namespaceuri = null;
* @return String
* @see java.lang.Exception#getMessage()
*/
+ @Override
public String getMessage() {
StringBuilder buf = new StringBuilder(super.getMessage());
if (faultyMembers==null || faultyMembers.size() == 0 ) {
return cause;
}
+ @Override
public String toString() {
return "FaultyMember:"+member.toString();
}
+ @Override
public int hashCode() {
return (member!=null)?member.hashCode():0;
}
+ @Override
public boolean equals(Object o) {
if (member==null || (!(o instanceof FaultyMember)) || (((FaultyMember)o).member==null)) return false;
return member.equals(((FaultyMember)o).member);
System.arraycopy(id,offset,this.id,0,length);
}
+ @Override
public int hashCode() {
if ( id == null ) return 0;
return Arrays.hashCode(id);
}
+ @Override
public boolean equals(Object other) {
boolean result = (other instanceof UniqueId);
if ( result ) {
return id;
}
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder("UniqueId");
buf.append(org.apache.catalina.tribes.util.Arrays.toString(id));
//override optionflag
protected int optionFlag = Channel.SEND_OPTIONS_BYTE_MESSAGE|Channel.SEND_OPTIONS_USE_ACK|Channel.SEND_OPTIONS_SYNCHRONIZED_ACK;
+ @Override
public int getOptionFlag() {return optionFlag;}
+ @Override
public void setOptionFlag(int flag) {optionFlag=flag;}
private int startLevel = 0;
* @param options int - sender options, see class documentation
* @return ClusterMessage[] - the replies from the members, if any.
*/
+ @Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
if ( destination == null ) destination = membershipService.getMembers();
if ((msg.getOptions()&Channel.SEND_OPTIONS_MULTICAST) == Channel.SEND_OPTIONS_MULTICAST) {
* SND_RX_SEQ - starts the replication receiver<BR>
* @throws ChannelException if a startup error occurs or the service is already started.
*/
+ @Override
public void start(int svc) throws ChannelException {
this.internalStart(svc);
}
* SND_RX_SEQ - stops the replication receiver<BR>
* @throws ChannelException if a startup error occurs or the service is already started.
*/
+ @Override
public void stop(int svc) throws ChannelException {
this.internalStop(svc);
}
}
+ @Override
public void memberAdded(Member member){
SenderState.getSenderState(member);
super.memberAdded(member);
}
+ @Override
public void memberDisappeared(Member member){
SenderState.removeSenderState(member);
super.memberDisappeared(member);
}
+ @Override
public void messageReceived(ChannelMessage msg) {
if ( Logs.MESSAGES.isTraceEnabled() ) {
Logs.MESSAGES.trace("ChannelCoordinator - Received msg:" + new UniqueId(msg.getUniqueId()) + " at " +new java.sql.Timestamp(System.currentTimeMillis())+ " from "+msg.getAddress().getName());
this.membershipService.setMembershipListener(this);
}
+ @Override
public void heartbeat() {
if ( clusterSender!=null ) clusterSender.heartbeat();
super.heartbeat();
/**
* has members
*/
+ @Override
public boolean hasMembers() {
return this.getMembershipService().hasMembers();
}
* Get all current cluster members
* @return all members or empty array
*/
+ @Override
public Member[] getMembers() {
return this.getMembershipService().getMembers();
}
* @param mbr Member
* @return Member
*/
+ @Override
public Member getMember(Member mbr){
return this.getMembershipService().getMember(mbr);
}
*
* @return Member
*/
+ @Override
public Member getLocalMember(boolean incAlive) {
return this.getMembershipService().getLocalMember(incAlive);
}
* Invoke this method from the application on a periodic basis if
* you have turned off internal heartbeats <code>channel.setHeartbeat(false)</code>
*/
+ @Override
public void heartbeat() {
super.heartbeat();
Iterator<Object> i = membershipListeners.iterator();
* but its an extreme case, and you're probably better off doing that logic between the applications itself.
* @param msg ChannelMessage
*/
+ @Override
public void messageReceived(ChannelMessage msg) {
if ( msg == null ) return;
try {
* and the channel will broadcast it to the membership listeners
* @param member Member - the new member
*/
+ @Override
public void memberAdded(Member member) {
//notify upwards
for (int i=0; i<membershipListeners.size(); i++ ) {
* and the channel will broadcast it to the membership listeners
* @param member Member - the member that left or crashed
*/
+ @Override
public void memberDisappeared(Member member) {
//notify upwards
for (int i=0; i<membershipListeners.size(); i++ ) {
* @throws ChannelException
* @see org.apache.catalina.tribes.Channel#start(int)
*/
+ @Override
public synchronized void start(int svc) throws ChannelException {
setupDefaultStack();
if (optionCheck) checkOptionFlags();
* @throws ChannelException
* @see org.apache.catalina.tribes.Channel#stop(int)
*/
+ @Override
public synchronized void stop(int svc) throws ChannelException {
if (hbthread != null) {
hbthread.stopHeartbeat();
interrupt();
}
+ @Override
public void run() {
while (doRun) {
try {
channel.removeChannelListener(this);
}
+ @Override
public void finalize() {
breakdown();
}
}
}
+ @Override
public int hashCode() {
return key.hashCode();
}
+ @Override
public boolean equals(Object o) {
if ( o instanceof RpcCollector ) {
RpcCollector r = (RpcCollector)o;
this.id = id;
}
+ @Override
public int hashCode() {
return id[0]+id[1]+id[2]+id[3];
}
+ @Override
public boolean equals(Object o) {
if ( o instanceof RpcCollectorKey ) {
RpcCollectorKey r = (RpcCollectorKey)o;
out.writeObject(message);
}
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder("RpcMessage[");
buf.append(super.toString());
reply = true;
}
+ @Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
reply = true;
int length = in.readInt();
in.read(rpcId, 0, length);
}
+ @Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeInt(uuid.length);
out.write(uuid, 0, uuid.length);
protected byte[] domain = new byte[0];
+ @Override
public void messageReceived(ChannelMessage msg) {
//should we filter incoming based on domain?
super.messageReceived(msg);
}//messageReceived
+ @Override
public void memberAdded(Member member) {
if ( membership == null ) setupMembership();
boolean notify = false;
if ( notify ) super.memberAdded(member);
}
+ @Override
public void memberDisappeared(Member member) {
if ( membership == null ) setupMembership();
boolean notify = false;
if ( notify ) super.memberDisappeared(member);
}
+ @Override
public boolean hasMembers() {
if ( membership == null ) setupMembership();
return membership.hasMembers();
}
+ @Override
public Member[] getMembers() {
if ( membership == null ) setupMembership();
return membership.getMembers();
}
+ @Override
public Member getMember(Member mbr) {
if ( membership == null ) setupMembership();
return membership.getMember(mbr);
}
+ @Override
public Member getLocalMember(boolean incAlive) {
return super.getLocalMember(incAlive);
}
protected boolean deepclone = true;
+ @Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
int size = msg.getMessage().getLength();
boolean frag = (size>maxSize) && okToProcess(msg.getOptions());
}
}
+ @Override
public void messageReceived(ChannelMessage msg) {
boolean isFrag = XByteBuffer.toBoolean(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-1);
msg.getMessage().trim(1);
}
}
+ @Override
public void heartbeat() {
try {
Set<FragKey> set = fragpieces.keySet();
public FragKey(byte[] id ) {
this.uniqueId = id;
}
+ @Override
public int hashCode() {
return XByteBuffer.toInt(uniqueId,0);
}
+ @Override
public boolean equals(Object o ) {
if ( o instanceof FragKey ) {
return Arrays.equals(uniqueId,((FragKey)o).uniqueId);
public class GzipInterceptor extends ChannelInterceptorBase {
public static final int DEFAULT_BUFFER_SIZE = 2048;
+ @Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
try {
byte[] data = compress(msg.getMessage().getBytes());
}
}
+ @Override
public void messageReceived(ChannelMessage msg) {
try {
byte[] data = decompress(msg.getMessage().getBytes());
protected long keepAliveTime = 5000;
protected LinkedBlockingQueue<Runnable> runnablequeue = new LinkedBlockingQueue<Runnable>();
+ @Override
public long getCurrentSize() {
return currentSize.get();
}
+ @Override
public long addAndGetCurrentSize(long inc) {
return currentSize.addAndGet(inc);
}
+ @Override
public long setAndGetCurrentSize(long value) {
currentSize.set(value);
return value;
}
+ @Override
public boolean addToQueue(ChannelMessage msg, Member[] destination, InterceptorPayload payload) {
final LinkObject obj = new LinkObject(msg,destination,payload);
Runnable r = new Runnable() {
return true;
}
+ @Override
public LinkObject removeFromQueue() {
return null; //not used, thread pool contains its own queue.
}
+ @Override
public void startQueue() {
if ( run ) return;
executor = new ThreadPoolExecutor(maxSpareThreads,maxThreads,keepAliveTime,TimeUnit.MILLISECONDS,runnablequeue);
run = true;
}
+ @Override
public void stopQueue() {
run = false;
executor.shutdownNow();
setOptionFlag(Channel.SEND_OPTIONS_ASYNCHRONOUS);
}
+ @Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
boolean async = (msg.getOptions() & Channel.SEND_OPTIONS_ASYNCHRONOUS) == Channel.SEND_OPTIONS_ASYNCHRONOUS;
if ( async && run ) {
}
+ @Override
public void setOptionFlag(int flag) {
if ( flag != Channel.SEND_OPTIONS_ASYNCHRONOUS ) log.warn("Warning, you are overriding the asynchronous option flag, this will disable the Channel.SEND_OPTIONS_ASYNCHRONOUS that other apps might use.");
super.setOptionFlag(flag);
return value;
}
+ @Override
public void start(int svc) throws ChannelException {
//start the thread
if (!run ) {
}
+ @Override
public void stop(int svc) throws ChannelException {
//stop the thread
if ( run ) {
//============================================================================================================
// OVERRIDDEN METHODS FROM CHANNEL INTERCEPTOR BASE
//============================================================================================================
+ @Override
public void start(int svc) throws ChannelException {
if (membership == null) setupMembership();
if (started)return;
startElection(false);
}
+ @Override
public void stop(int svc) throws ChannelException {
try {
halt();
}
+ @Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
waitForRelease();
super.sendMessage(destination, msg, payload);
}
+ @Override
public void messageReceived(ChannelMessage msg) {
if ( Arrays.contains(msg.getMessage().getBytesDirect(),0,COORD_ALIVE,0,COORD_ALIVE.length) ) {
//ignore message, its an alive message
}
}
+ @Override
public boolean accept(ChannelMessage msg) {
return super.accept(msg);
}
+ @Override
public void memberAdded(Member member) {
memberAdded(member,true);
}
}
+ @Override
public void memberDisappeared(Member member) {
try {
return coord != null && getLocalMember(false).equals(coord);
}
+ @Override
public void heartbeat() {
try {
MemberImpl local = (MemberImpl)getLocalMember(false);
/**
* has members
*/
+ @Override
public boolean hasMembers() {
return membership.hasMembers();
* Get all current cluster members
* @return all members or empty array
*/
+ @Override
public Member[] getMembers() {
return membership.getMembers();
* @param mbr Member
* @return Member
*/
+ @Override
public Member getMember(Member mbr) {
return membership.getMember(mbr);
*
* @return Member
*/
+ @Override
public Member getLocalMember(boolean incAlive) {
Member local = super.getLocalMember(incAlive);
if ( view == null && (local != null)) setupMembership();
}
}
+ @Override
public void fireInterceptorEvent(InterceptorEvent event) {
if (event instanceof CoordinationEvent &&
((CoordinationEvent)event).type == CoordinationEvent.EVT_CONF_RX)
return interceptor;
}
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder("CoordinationEvent[type=");
buf.append(type).append("\n\tLocal:");
ReentrantReadWriteLock inLock = new ReentrantReadWriteLock(true);
ReentrantReadWriteLock outLock= new ReentrantReadWriteLock(true);
+ @Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
if ( !okToProcess(msg.getOptions()) ) {
super.sendMessage(destination, msg, payload);
if ( cx != null ) throw cx;
}
+ @Override
public void messageReceived(ChannelMessage msg) {
if ( !okToProcess(msg.getOptions()) ) {
super.messageReceived(msg);
return result;
}
+ @Override
public void memberAdded(Member member) {
//notify upwards
super.memberAdded(member);
}
+ @Override
public void memberDisappeared(Member member) {
//reset counters - lock free
incounter.remove(member);
/**
* has members
*/
+ @Override
public boolean hasMembers() {
return super.hasMembers() || (members.size()>0);
}
* Get all current cluster members
* @return all members or empty array
*/
+ @Override
public Member[] getMembers() {
if ( members.size() == 0 ) return super.getMembers();
else {
* @param mbr Member
* @return Member
*/
+ @Override
public Member getMember(Member mbr) {
if ( members.contains(mbr) ) return members.get(members.indexOf(mbr));
else return super.getMember(mbr);
*
* @return Member
*/
+ @Override
public Member getLocalMember(boolean incAlive) {
if (this.localMember != null ) return localMember;
else return super.getLocalMember(incAlive);
* @param svc int
* @throws ChannelException
*/
+ @Override
public void start(int svc) throws ChannelException {
if ( (Channel.SND_RX_SEQ&svc)==Channel.SND_RX_SEQ ) super.start(Channel.SND_RX_SEQ);
if ( (Channel.SND_TX_SEQ&svc)==Channel.SND_TX_SEQ ) super.start(Channel.SND_TX_SEQ);
final Member[] mbrs = members.toArray(new Member[members.size()]);
final ChannelInterceptorBase base = this;
Thread t = new Thread() {
+ @Override
public void run() {
for (int i=0; i<mbrs.length; i++ ) {
base.memberAdded(mbrs[i]);
protected HashMap<Member, Long> addSuspects = new HashMap<Member, Long>();
+ @Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
try {
super.sendMessage(destination, msg, payload);
}
}
+ @Override
public void messageReceived(ChannelMessage msg) {
//catch incoming
boolean process = true;
}//messageReceived
+ @Override
public void memberAdded(Member member) {
if ( membership == null ) setupMembership();
boolean notify = false;
if ( notify ) super.memberAdded(member);
}
+ @Override
public void memberDisappeared(Member member) {
if ( membership == null ) setupMembership();
boolean notify = false;
}
}
+ @Override
public boolean hasMembers() {
if ( membership == null ) setupMembership();
return membership.hasMembers();
}
+ @Override
public Member[] getMembers() {
if ( membership == null ) setupMembership();
return membership.getMembers();
}
+ @Override
public Member getMember(Member mbr) {
if ( membership == null ) setupMembership();
return membership.getMember(mbr);
}
+ @Override
public Member getLocalMember(boolean incAlive) {
return super.getLocalMember(incAlive);
}
+ @Override
public void heartbeat() {
super.heartbeat();
checkMembers(false);
WeakReference<TcpFailureDetector> failureDetector = null;
WeakReference<StaticMembershipInterceptor> staticMembers = null;
+ @Override
public synchronized void start(int svc) throws ChannelException {
super.start(svc);
running = true;
}
+ @Override
public void stop(int svc) throws ChannelException {
running = false;
if ( thread != null ) thread.interrupt();
super.stop(svc);
}
+ @Override
public void heartbeat() {
super.heartbeat();
if (!getUseThread()) sendPing();
}
}
+ @Override
public void messageReceived(ChannelMessage msg) {
//catch incoming
boolean process = true;
}//messageReceived
protected class PingThread extends Thread {
+ @Override
public void run() {
while (running) {
try {
DecimalFormat df = new DecimalFormat("#0.00");
+ @Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
if ( access.addAndGet(1) == 1 ) txStart = System.currentTimeMillis();
long bytes = XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackageLength());
msgTxCnt.addAndGet(1);
}
+ @Override
public void messageReceived(ChannelMessage msg) {
if ( rxStart == 0 ) rxStart = System.currentTimeMillis();
long bytes = XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackageLength());
protected long expire = 1000 * 60; //one minute expiration
protected boolean deepclone = true;
+ @Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws
ChannelException {
//todo, optimize, if destination.length==1, then we can do
}
}
+ @Override
public void messageReceived(ChannelMessage msg) {
if (okToProcess(msg.getOptions())) {
if ( msg.getMessage().getLength() == (START_DATA.length+msg.getUniqueId().length+END_DATA.length) &&
this.expire = expire;
}
+ @Override
public void heartbeat() {
try {
long now = System.currentTimeMillis();
return data;
}
+ @Override
public int hashCode() {
return XByteBuffer.toInt(getUniqueId(),0);
}
* @param o Object
* @return boolean
*/
+ @Override
public boolean equals(Object o) {
if ( o instanceof ChannelData ) {
return Arrays.equals(getUniqueId(),((ChannelData)o).getUniqueId());
* Create a shallow clone, only the data gets recreated
* @return ClusterData
*/
+ @Override
public Object clone() {
// byte[] d = this.getDataPackage();
// return ClusterData.getDataFromPackage(d);
( (Channel.SEND_OPTIONS_SYNCHRONIZED_ACK & options) != Channel.SEND_OPTIONS_SYNCHRONIZED_ACK);
}
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append("ClusterData[src=");
* been closed.
* @todo Implement this java.io.OutputStream method
*/
+ @Override
public void write(int b) throws IOException {
buffer.append((byte)b);
}
* @exception ClassNotFoundException if this class cannot be found
* @exception IOException if an input/output error occurs
*/
+ @Override
public Class<?> resolveClass(ObjectStreamClass classDesc)
throws ClassNotFoundException, IOException {
String name = classDesc.getName();
else throw new ClassNotFoundException(name);
}
+ @Override
public void close() throws IOException {
this.classLoaders = null;
super.close();
super();
setName("Tribes-MembershipReceiver");
}
+ @Override
public void run() {
while ( doRunReceiver ) {
try {
setName("Tribes-MembershipSender");
}
+ @Override
public void run() {
while ( doRunSender ) {
try {
return false;
}
}
+ @Override
public void run() {
boolean success = false;
int attempt = 0;
/**
* String representation of this object
*/
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder("org.apache.catalina.tribes.membership.MemberImpl[");
buf.append(getName()).append(",");
* @see java.lang.Object#hashCode()
* @return The hash code
*/
+ @Override
public int hashCode() {
return getHost()[0]+getHost()[1]+getHost()[2]+getHost()[3];
}
* Returns true if the param o is a McastMember with the same name
* @param o
*/
+ @Override
public boolean equals(Object o) {
if ( o instanceof MemberImpl ) {
return Arrays.equals(this.getHost(),((MemberImpl)o).getHost()) &&
*/
protected Comparator<Member> memberComparator = new MemberComparator();
+ @Override
public Object clone() {
synchronized (membersLock) {
Membership clone = new Membership(local, memberComparator);
finalize();
}
+ @Override
public void finalize() {
try {broadcast(MapMessage.MSG_STOP,false); }catch ( Exception ignore){}
//cleanup
this.externalLoaders = null;
}
+ @Override
public int hashCode() {
return Arrays.hashCode(this.mapContextName);
}
+ @Override
public boolean equals(Object o) {
if ( o == null ) return false;
if ( !(o instanceof AbstractReplicatedMap)) return false;
* @param key Object
* @return Object
*/
+ @Override
public Object remove(Object key) {
return remove(key,true);
}
return (MapEntry)super.get(key);
}
+ @Override
public Object get(Object key) {
MapEntry entry = (MapEntry)super.get(key);
if (log.isTraceEnabled()) log.trace("Requesting id:"+key+" entry:"+entry);
* @param key Object
* @return boolean
*/
+ @Override
public boolean containsKey(Object key) {
return super.containsKey(key);
}
+ @Override
public Object put(Object key, Object value) {
return put(key,value,true);
}
* Copies all values from one map to this instance
* @param m Map
*/
+ @Override
public void putAll(Map m) {
Iterator i = m.entrySet().iterator();
while ( i.hasNext() ) {
}
}
+ @Override
public void clear() {
clear(true);
}
}
}
+ @Override
public boolean containsValue(Object value) {
if ( value == null ) {
return super.containsValue(value);
}//end if
}
+ @Override
public Object clone() {
throw new UnsupportedOperationException("This operation is not valid on a replicated map");
}
return super.size();
}
+ @Override
public Set<MapEntry> entrySet() {
LinkedHashSet<MapEntry> set = new LinkedHashSet<MapEntry>(super.size());
Iterator i = super.entrySet().iterator();
return Collections.unmodifiableSet(set);
}
+ @Override
public Set<Object> keySet() {
//todo implement
//should only return keys where this is active.
}
+ @Override
public int size() {
//todo, implement a counter variable instead
//only count active members in this node
return counter;
}
+ @Override
public boolean isEmpty() {
return size()==0;
}
+ @Override
public Collection<Object> values() {
ArrayList<Object> values = new ArrayList<Object>();
Iterator i = super.entrySet().iterator();
return old;
}
+ @Override
public int hashCode() {
return key.hashCode();
}
+ @Override
public boolean equals(Object o) {
return key.equals(o);
}
}
}
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder("MapEntry[key:");
buf.append(getKey()).append("; ");
private Member[] nodes;
private Member primary;
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder("MapMessage[context=");
buf.append(new String(mapId));
* shallow clone
* @return Object
*/
+ @Override
public Object clone() {
MapMessage msg = new MapMessage(this.mapId, this.msgtype, this.diff, this.key, this.value, this.diffvalue, this.primary, this.nodes);
msg.keydata = this.keydata;
//------------------------------------------------------------------------------
// METHODS TO OVERRIDE
//------------------------------------------------------------------------------
+ @Override
protected int getStateMessageType() {
return AbstractReplicatedMap.MapMessage.MSG_STATE;
}
* @return Member - the backup node
* @throws ChannelException
*/
+ @Override
protected Member[] publishEntryInfo(Object key, Object value) throws ChannelException {
if (! (key instanceof Serializable && value instanceof Serializable) ) return new Member[0];
Member[] members = getMapMembers();
//------------------------------------------------------------------------------
// METHODS TO OVERRIDE
//------------------------------------------------------------------------------
+ @Override
protected int getStateMessageType() {
return AbstractReplicatedMap.MapMessage.MSG_STATE_COPY;
}
* @return Member - the backup node
* @throws ChannelException
*/
+ @Override
protected Member[] publishEntryInfo(Object key, Object value) throws ChannelException {
if (! (key instanceof Serializable && value instanceof Serializable) ) return new Member[0];
//select a backup node
queue.returnSender(sender);
}
+ @Override
public synchronized void connect() throws IOException {
//do nothing, happens in the socket sender itself
queue.open();
setConnected(true);
}
+ @Override
public synchronized void disconnect() {
queue.close();
setConnected(false);
return poolSize;
}
+ @Override
public boolean keepalive() {
//do nothing, the pool checks on every return
return (queue==null)?false:queue.checkIdleKeepAlive();
}
}
+ @Override
public void close() {
setDoRun(false);
try {socket.close();}catch ( Exception ignore){}
* Connect other cluster member receiver
* @see org.apache.catalina.tribes.transport.IDataSender#connect()
*/
+ @Override
public void connect() throws IOException {
openSocket();
}
*
* @see IDataSender#disconnect()
*/
+ @Override
public void disconnect() {
boolean connect = isConnected();
closeSocket();
/**
* Name of this SockerSender
*/
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder("DataSender[(");
buf.append(super.toString()).append(")");
else return result;
}
+ @Override
public void connect() throws IOException {
//do nothing, we connect on demand
setConnected(true);
}
+ @Override
public synchronized void disconnect() {
try {close(); }catch (Exception x){}
setConnected(false);
}
+ @Override
public void finalize() {
try {disconnect(); }catch ( Exception ignore){}
}
+ @Override
public boolean keepalive() {
//throw new UnsupportedOperationException("Method ParallelBioSender.checkKeepAlive() not implemented");
boolean result = false;
* @todo Implement this org.apache.catalina.tribes.transport.PooledSender
* method
*/
+ @Override
public DataSender getNewDataSender() {
MultipointBioSender sender = new MultipointBioSender();
AbstractSender.transferProperties(this,sender);
// return interestOpsMutex;
// }
+ @Override
public void stop() {
this.stopListening();
super.stop();
* @throws Exception
* @see org.apache.catalina.tribes.ClusterReceiver#start()
*/
+ @Override
public void start() throws IOException {
super.start();
try {
* @throws IOException
* @todo Implement this org.apache.catalina.tribes.transport.IDataSender method
*/
+ @Override
public synchronized void connect() throws IOException {
if ( connecting || isConnected()) return;
connecting = true;
*
* @todo Implement this org.apache.catalina.tribes.transport.IDataSender method
*/
+ @Override
public void disconnect() {
try {
connecting = false;
else return result;
}
+ @Override
public void connect() {
//do nothing, we connect on demand
setConnected(true);
}
+ @Override
public synchronized void disconnect() {
setConnected(false);
try {close(); }catch (Exception x){}
}
+ @Override
public void finalize() {
try {disconnect(); }catch ( Exception ignore){}
try {selector.close();} catch (Exception ignore) {}
}
+ @Override
public boolean keepalive() {
boolean result = false;
for ( Iterator<Entry<Member, NioSender>> i = nioSenders.entrySet().iterator(); i.hasNext(); ) {
}
}
+ @Override
public DataSender getNewDataSender() {
try {
ParallelNioSender sender = new ParallelNioSender();
}
}
+ @Override
public synchronized void disconnect() {
this.connected = false;
super.disconnect();
}
+ @Override
public synchronized void connect() throws IOException {
this.connected = true;
super.connect();
return super.offer(o); //forces the item onto the queue, to be used if the task is rejected
}
+ @Override
public boolean offer(Runnable o) {
//we can't do any checks
if (parent==null) return super.offer(o);
/**
* Return the set of {@link Role}s assigned specifically to this group.
*/
+ @Override
public Iterator<Role> getRoles() {
synchronized (roles) {
/**
* Return the {@link UserDatabase} within which this Group is defined.
*/
+ @Override
public UserDatabase getUserDatabase() {
return (this.database);
/**
* Return the set of {@link org.apache.catalina.User}s that are members of this group.
*/
+ @Override
public Iterator<User> getUsers() {
ArrayList<User> results = new ArrayList<User>();
*
* @param role The new role
*/
+ @Override
public void addRole(Role role) {
synchronized (roles) {
*
* @param role The role to check
*/
+ @Override
public boolean isInRole(Role role) {
synchronized (roles) {
*
* @param role The old role
*/
+ @Override
public void removeRole(Role role) {
synchronized (roles) {
/**
* Remove all {@link Role}s from those assigned to this group.
*/
+ @Override
public void removeRoles() {
synchronized (roles) {
/**
* <p>Return a String representation of this group in XML format.</p>
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("<group groupname=\"");
/**
* Return the {@link UserDatabase} within which this role is defined.
*/
+ @Override
public UserDatabase getUserDatabase() {
return (this.database);
/**
* <p>Return a String representation of this role in XML format.</p>
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("<role rolename=\"");
/**
* Return the set of {@link Group}s to which this user belongs.
*/
+ @Override
public Iterator<Group> getGroups() {
synchronized (groups) {
/**
* Return the set of {@link Role}s assigned specifically to this user.
*/
+ @Override
public Iterator<Role> getRoles() {
synchronized (roles) {
*
* @param group The new group
*/
+ @Override
public void addGroup(Group group) {
synchronized (groups) {
*
* @param role The new role
*/
+ @Override
public void addRole(Role role) {
synchronized (roles) {
*
* @param group The group to check
*/
+ @Override
public boolean isInGroup(Group group) {
synchronized (groups) {
*
* @param role The role to check
*/
+ @Override
public boolean isInRole(Role role) {
synchronized (roles) {
*
* @param group The old group
*/
+ @Override
public void removeGroup(Group group) {
synchronized (groups) {
/**
* Remove all {@link Group}s from those this user belongs to.
*/
+ @Override
public void removeGroups() {
synchronized (groups) {
*
* @param role The old role
*/
+ @Override
public void removeRole(Role role) {
synchronized (roles) {
/**
* Remove all {@link Role}s from those assigned to this user.
*/
+ @Override
public void removeRoles() {
synchronized (roles) {
* <code>username</code> or </code>name</code> for the username
* property.</p>
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("<user username=\"");
/**
* Return a String representation of this UserDatabase.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("MemoryUserDatabase[id=");
* @exception ClassNotFoundException if this class cannot be found
* @exception IOException if an input/output error occurs
*/
+ @Override
public Class<?> resolveClass(ObjectStreamClass classDesc)
throws ClassNotFoundException, IOException {
try {
* class descriptor. Do this using the class loader assigned to this
* Context.
*/
+ @Override
protected Class<?> resolveProxyClass(String[] interfaces)
throws IOException, ClassNotFoundException {
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("Extension[");
return true;
}
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ManifestResource[");
*
* @exception IllegalStateException if this map is currently locked
*/
+ @Override
public void clear() {
if (locked)
*
* @exception IllegalStateException if this map is currently locked
*/
+ @Override
public V put(K key, V value) {
if (locked)
*
* @exception IllegalStateException if this map is currently locked
*/
+ @Override
public void putAll(Map<? extends K,? extends V> map) {
if (locked)
*
* @exception IllegalStateException if this map is currently locked
*/
+ @Override
public V remove(Object key) {
if (locked)
*
* @exception IllegalStateException if this ResourceSet is locked
*/
+ @Override
public boolean add(T o) {
if (locked)
*
* @exception IllegalStateException if this ResourceSet is locked
*/
+ @Override
public void clear() {
if (locked)
*
* @exception IllegalStateException if this ResourceSet is locked
*/
+ @Override
public boolean remove(Object o) {
if (locked)
*
* @return String containing the generated XML
*/
+ @Override
public String toString() {
return buffer.toString();
}
*/
private static final ThreadLocal<AccessDateStruct> currentDateStruct =
new ThreadLocal<AccessDateStruct>() {
+ @Override
protected AccessDateStruct initialValue() {
return new AccessDateStruct();
}
/**
* Return descriptive information about this implementation.
*/
+ @Override
public String getInfo() {
return (info);
}
* invoked inside the classloading context of this container. Unexpected
* throwables will be caught and logged.
*/
+ @Override
public void backgroundProcess() {
if (started && getEnabled() && writer != null && buffered) {
writer.flush();
* @exception IOException if an input/output error has occurred
* @exception ServletException if a servlet error has occurred
*/
+ @Override
public void invoke(Request request, Response response) throws IOException,
ServletException {
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
}
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
// Perform the request
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public void event(Request request, Response response, CometEvent event)
throws IOException, ServletException {
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
/**
* Return descriptive information about this implementation.
*/
+ @Override
public String getInfo() {
return (extendedAccessLogInfo);
}
/**
* Open the new log file for the date specified by <code>dateStamp</code>.
*/
+ @Override
protected synchronized void open() {
super.open();
if (currentLogFile.length()==0) {
private static final ThreadLocal<ElementTimestampStruct> currentDate =
new ThreadLocal<ElementTimestampStruct>() {
+ @Override
protected ElementTimestampStruct initialValue() {
return new ElementTimestampStruct("yyyy-MM-dd");
}
private static final ThreadLocal<ElementTimestampStruct> currentTime =
new ThreadLocal<ElementTimestampStruct>() {
+ @Override
protected ElementTimestampStruct initialValue() {
return new ElementTimestampStruct("HH:mm:ss");
}
}
+ @Override
protected AccessLogElement[] createLogElements() {
if (log.isDebugEnabled()) {
log.debug("decodePattern, pattern =" + pattern);
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception IOException if an input/output error occurred
* @exception ServletException if a servlet error occurred
*/
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public abstract void invoke(Request request, Response response)
throws IOException, ServletException;
return null;
return strcert0;
}
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
/**
* Return descriptive information about this Valve implementation.
*/
+ @Override
public String getInfo() {
return (info);
}
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
/**
* Return a String rendering of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder(this.getClass().getName());
sb.append("[");