当前位置: 首页>>代码示例>>Java>>正文


Java RequestInfo类代码示例

本文整理汇总了Java中org.apache.coyote.RequestInfo的典型用法代码示例。如果您正苦于以下问题:Java RequestInfo类的具体用法?Java RequestInfo怎么用?Java RequestInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RequestInfo类属于org.apache.coyote包,在下文中一共展示了RequestInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: register

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
protected void register(AjpProcessor processor) {
    if (proto.getDomain() != null) {
        synchronized (this) {
            try {
                long count = registerCount.incrementAndGet();
                RequestInfo rp = processor.getRequest().getRequestProcessor();
                rp.setGlobalProcessor(global);
                ObjectName rpName = new ObjectName
                    (proto.getDomain() + ":type=RequestProcessor,worker="
                        + proto.getName() + ",name=AjpRequest" + count);
                if (log.isDebugEnabled()) {
                    log.debug("Register " + rpName);
                }
                Registry.getRegistry(null, null).registerComponent(rp, rpName, null);
                rp.setRpName(rpName);
            } catch (Exception e) {
                log.warn("Error registering request");
            }
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:22,代码来源:AjpProtocol.java

示例2: unregister

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
protected void unregister(AjpProcessor processor) {
    if (proto.getDomain() != null) {
        synchronized (this) {
            try {
                RequestInfo rp = processor.getRequest().getRequestProcessor();
                rp.setGlobalProcessor(null);
                ObjectName rpName = rp.getRpName();
                if (log.isDebugEnabled()) {
                    log.debug("Unregister " + rpName);
                }
                Registry.getRegistry(null, null).unregisterComponent(rpName);
                rp.setRpName(null);
            } catch (Exception e) {
                log.warn("Error unregistering request", e);
            }
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:AjpProtocol.java

示例3: register

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
protected void register(AjpAprProcessor processor) {
    if (proto.getDomain() != null) {
        synchronized (this) {
            try {
                long count = registerCount.incrementAndGet();
                RequestInfo rp = processor.getRequest().getRequestProcessor();
                rp.setGlobalProcessor(global);
                ObjectName rpName = new ObjectName
                    (proto.getDomain() + ":type=RequestProcessor,worker="
                        + proto.getName() + ",name=AjpRequest" + count);
                if (log.isDebugEnabled()) {
                    log.debug("Register " + rpName);
                }
                Registry.getRegistry(null, null).registerComponent(rp, rpName, null);
                rp.setRpName(rpName);
            } catch (Exception e) {
                log.warn("Error registering request");
            }
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:22,代码来源:AjpAprProtocol.java

示例4: unregister

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
protected void unregister(AjpAprProcessor processor) {
    if (proto.getDomain() != null) {
        synchronized (this) {
            try {
                RequestInfo rp = processor.getRequest().getRequestProcessor();
                rp.setGlobalProcessor(null);
                ObjectName rpName = rp.getRpName();
                if (log.isDebugEnabled()) {
                    log.debug("Unregister " + rpName);
                }
                Registry.getRegistry(null, null).unregisterComponent(rpName);
                rp.setRpName(null);
            } catch (Exception e) {
                log.warn("Error unregistering request", e);
            }
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:AjpAprProtocol.java

示例5: register

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
protected void register(Http11Processor processor) {
    if (proto.getDomain() != null) {
        synchronized (this) {
            try {
                long count = registerCount.incrementAndGet();
                RequestInfo rp = processor.getRequest().getRequestProcessor();
                rp.setGlobalProcessor(global);
                ObjectName rpName = new ObjectName
                    (proto.getDomain() + ":type=RequestProcessor,worker="
                        + proto.getName() + ",name=HttpRequest" + count);
                if (log.isDebugEnabled()) {
                    log.debug("Register " + rpName);
                }
                Registry.getRegistry(null, null).registerComponent(rp, rpName, null);
                rp.setRpName(rpName);
            } catch (Exception e) {
                log.warn("Error registering request");
            }
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:22,代码来源:Http11Protocol.java

示例6: unregister

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
protected void unregister(Http11Processor processor) {
    if (proto.getDomain() != null) {
        synchronized (this) {
            try {
                RequestInfo rp = processor.getRequest().getRequestProcessor();
                rp.setGlobalProcessor(null);
                ObjectName rpName = rp.getRpName();
                if (log.isDebugEnabled()) {
                    log.debug("Unregister " + rpName);
                }
                Registry.getRegistry(null, null).unregisterComponent(rpName);
                rp.setRpName(null);
            } catch (Exception e) {
                log.warn("Error unregistering request", e);
            }
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:Http11Protocol.java

示例7: register

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
protected void register(Http11AprProcessor processor) {
    if (proto.getDomain() != null) {
        synchronized (this) {
            try {
                long count = registerCount.incrementAndGet();
                RequestInfo rp = processor.getRequest().getRequestProcessor();
                rp.setGlobalProcessor(global);
                ObjectName rpName = new ObjectName
                    (proto.getDomain() + ":type=RequestProcessor,worker="
                        + proto.getName() + ",name=HttpRequest" + count);
                if (log.isDebugEnabled()) {
                    log.debug("Register " + rpName);
                }
                Registry.getRegistry(null, null).registerComponent(rp, rpName, null);
                rp.setRpName(rpName);
            } catch (Exception e) {
                log.warn("Error registering request");
            }
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:22,代码来源:Http11AprProtocol.java

示例8: unregister

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
protected void unregister(Http11AprProcessor processor) {
    if (proto.getDomain() != null) {
        synchronized (this) {
            try {
                RequestInfo rp = processor.getRequest().getRequestProcessor();
                rp.setGlobalProcessor(null);
                ObjectName rpName = rp.getRpName();
                if (log.isDebugEnabled()) {
                    log.debug("Unregister " + rpName);
                }
                Registry.getRegistry(null, null).unregisterComponent(rpName);
                rp.setRpName(null);
            } catch (Exception e) {
                log.warn("Error unregistering request", e);
            }
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:Http11AprProtocol.java

示例9: event

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
/**
 * Process pipelined HTTP requests using the specified input and output
 * streams.
 *
 * @throws IOException error during an I/O operation
 */
@Override
public SocketState event(SocketStatus status)
    throws IOException {

    RequestInfo rp = request.getRequestProcessor();

    try {
        rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
        if (!getAdapter().event(request, response, status)) {
            setErrorState(ErrorState.CLOSE_NOW, null);
        }
    } catch (InterruptedIOException e) {
        setErrorState(ErrorState.CLOSE_NOW, e);
    } catch (Throwable t) {
        ExceptionUtils.handleThrowable(t);
        // 500 - Internal Server Error
        response.setStatus(500);
        setErrorState(ErrorState.CLOSE_NOW, t);
        getAdapter().log(request, response, 0);
        log.error(sm.getString("http11processor.request.process"), t);
    }

    rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);

    if (getErrorState().isError() || status==SocketStatus.STOP) {
        return SocketState.CLOSED;
    } else if (!comet) {
        inputBuffer.nextRequest();
        outputBuffer.nextRequest();
        return SocketState.OPEN;
    } else {
        return SocketState.LONG;
    }
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:41,代码来源:Http11AprProcessor.java

示例10: addElement

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
@Override
public void addElement(StringBuilder buf, Date date, Request request,
        Response response, long time) {
    RequestInfo info = request.getCoyoteRequest().getRequestProcessor();
    if(info != null) {
        buf.append(info.getWorkerThreadName());
    } else {
        buf.append("-");
    }
}
 
开发者ID:WhiteBearSolutions,项目名称:WBSAirback,代码行数:11,代码来源:AccessLogValve.java

示例11: event

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
/**
 * Process pipelined HTTP requests using the specified input and output
 * streams.
 *
 * @throws IOException
 *             error during an I/O operation
 */
@Override
public SocketState event(SocketStatus status) throws IOException {

	RequestInfo rp = request.getRequestProcessor();

	try {
		rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
		if (!getAdapter().event(request, response, status)) {
			setErrorState(ErrorState.CLOSE_NOW, null);
		}
	} catch (InterruptedIOException e) {
		setErrorState(ErrorState.CLOSE_NOW, e);
	} catch (Throwable t) {
		ExceptionUtils.handleThrowable(t);
		// 500 - Internal Server Error
		response.setStatus(500);
		setErrorState(ErrorState.CLOSE_NOW, t);
		getAdapter().log(request, response, 0);
		log.error(sm.getString("http11processor.request.process"), t);
	}

	rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);

	if (getErrorState().isError() || status == SocketStatus.STOP) {
		return SocketState.CLOSED;
	} else if (!comet) {
		inputBuffer.nextRequest();
		outputBuffer.nextRequest();
		return SocketState.OPEN;
	} else {
		return SocketState.LONG;
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:41,代码来源:Http11AprProcessor.java

示例12: asyncDispatch

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
@Override
public SocketState asyncDispatch(SocketStatus status) {

    RequestInfo rp = request.getRequestProcessor();
    try {
        rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
        error = !adapter.asyncDispatch(request, response, status);
        resetTimeouts();
    } catch (InterruptedIOException e) {
        error = true;
    } catch (Throwable t) {
        ExceptionUtils.handleThrowable(t);
        getLog().error(sm.getString("http11processor.request.process"), t);
        error = true;
    } finally {
        if (error) {
            // 500 - Internal Server Error
            response.setStatus(500);
            adapter.log(request, response, 0);
        }
    }

    rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);

    if (isAsync()) {
        if (error) {
            request.updateCounters();
            return SocketState.CLOSED;
        } else {
            return SocketState.LONG;
        }
    } else {
        request.updateCounters();
        if (error) {
            return SocketState.CLOSED;
        } else {
            return SocketState.OPEN;
        }
    }
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:41,代码来源:AbstractAjpProcessor.java

示例13: asyncDispatch

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
@Override
public SocketState asyncDispatch(SocketStatus status) {

    RequestInfo rp = request.getRequestProcessor();
    try {
        rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
        error = !adapter.asyncDispatch(request, response, status);
        resetTimeouts();
    } catch (InterruptedIOException e) {
        error = true;
    } catch (Throwable t) {
        ExceptionUtils.handleThrowable(t);
        getLog().error(sm.getString("http11processor.request.process"), t);
        error = true;
    } finally {
        if (error) {
            // 500 - Internal Server Error
            response.setStatus(500);
            adapter.log(request, response, 0);
        }
    }

    rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);

    if (error) {
        return SocketState.CLOSED;
    } else if (isAsync()) {
        return SocketState.LONG;
    } else {
        if (!keepAlive) {
            return SocketState.CLOSED;
        } else {
            getInputBuffer().nextRequest();
            getOutputBuffer().nextRequest();
            return SocketState.OPEN;
        }
    }
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:39,代码来源:AbstractHttp11Processor.java

示例14: event

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
/**
 * Process pipelined HTTP requests using the specified input and output
 * streams.
 *
 * @throws IOException error during an I/O operation
 */
@Override
public SocketState event(SocketStatus status)
    throws IOException {

    RequestInfo rp = request.getRequestProcessor();

    try {
        rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
        error = !adapter.event(request, response, status);
    } catch (InterruptedIOException e) {
        error = true;
    } catch (Throwable t) {
        ExceptionUtils.handleThrowable(t);
        log.error(sm.getString("http11processor.request.process"), t);
        // 500 - Internal Server Error
        response.setStatus(500);
        adapter.log(request, response, 0);
        error = true;
    }

    rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);

    if (error || status==SocketStatus.STOP) {
        return SocketState.CLOSED;
    } else if (!comet) {
        inputBuffer.nextRequest();
        outputBuffer.nextRequest();
        return SocketState.OPEN;
    } else {
        return SocketState.LONG;
    }
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:39,代码来源:Http11AprProcessor.java

示例15: asyncDispatch

import org.apache.coyote.RequestInfo; //导入依赖的package包/类
@Override
public SocketState asyncDispatch(SocketStatus status) {

    RequestInfo rp = request.getRequestProcessor();
    try {
        rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
        if (!getAdapter().asyncDispatch(request, response, status)) {
            setErrorState(ErrorState.CLOSE_NOW, null);
        }
        resetTimeouts();
    } catch (InterruptedIOException e) {
        setErrorState(ErrorState.CLOSE_NOW, e);
    } catch (Throwable t) {
        ExceptionUtils.handleThrowable(t);
        setErrorState(ErrorState.CLOSE_NOW, t);
        getLog().error(sm.getString("http11processor.request.process"), t);
    } finally {
        if (getErrorState().isError()) {
            // 500 - Internal Server Error
            response.setStatus(500);
            adapter.log(request, response, 0);
        }
    }

    rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);

    if (getErrorState().isError()) {
        return SocketState.CLOSED;
    } else if (isAsync()) {
        return SocketState.LONG;
    } else {
        if (!keepAlive) {
            return SocketState.CLOSED;
        } else {
            getInputBuffer().nextRequest();
            getOutputBuffer().nextRequest();
            return SocketState.OPEN;
        }
    }
}
 
开发者ID:sdw2330976,项目名称:apache-tomcat-7.0.57,代码行数:41,代码来源:AbstractHttp11Processor.java


注:本文中的org.apache.coyote.RequestInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。