org.eclipse.jetty.servlets
类 BalancerServlet

java.lang.Object
  继承者 org.eclipse.jetty.servlets.ProxyServlet
      继承者 org.eclipse.jetty.servlets.BalancerServlet
所有已实现的接口:
Servlet

public class BalancerServlet
extends ProxyServlet

6


嵌套类摘要
 
从类 org.eclipse.jetty.servlets.ProxyServlet 继承的嵌套类/接口
ProxyServlet.Transparent
 
字段摘要
 
从类 org.eclipse.jetty.servlets.ProxyServlet 继承的字段
_black, _client, _config, _context, _DontProxyHeaders, _hostHeader, _log, _white
 
构造方法摘要
BalancerServlet()
           
 
方法摘要
protected  String filterResponseHeaderValue(String headerName, String headerValue, HttpServletRequest request)
          Extension point for remote server response header filtering.
 String getHostHeader()
          Get the hostHeader.
 void init(ServletConfig config)
          Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
protected  HttpURI proxyHttpURI(HttpServletRequest request, String uri)
           
 void setHostHeader(String hostHeader)
          Set the hostHeader.
 boolean validateDestination(String host, String path)
          Check the request hostname and path against white- and blacklist.
 
从类 org.eclipse.jetty.servlets.ProxyServlet 继承的方法
createHttpClient, createHttpClientInstance, createLogger, customizeContinuation, customizeExchange, destroy, getServletConfig, getServletInfo, handleConnect, handleOnConnectionFailed, handleOnException, handleOnExpire, proxyHttpURI, service
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

BalancerServlet

public BalancerServlet()
方法详细信息

init

public void init(ServletConfig config)
          throws ServletException
从接口 Servlet 复制的描述
Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

The servlet container calls the init method exactly once after instantiating the servlet. The init method must complete successfully before the servlet can receive any requests.

The servlet container cannot place the servlet into service if the init method

  1. Throws a ServletException
  2. Does not return within a time period defined by the Web server

指定者:
接口 Servlet 中的 init
覆盖:
ProxyServlet 中的 init
参数:
config - a ServletConfig object containing the servlet's configuration and initialization parameters
抛出:
ServletException - if an exception has occurred that interferes with the servlet's normal operation
另请参见:
UnavailableException, Servlet.getServletConfig()

proxyHttpURI

protected HttpURI proxyHttpURI(HttpServletRequest request,
                               String uri)
                        throws MalformedURLException
覆盖:
ProxyServlet 中的 proxyHttpURI
抛出:
MalformedURLException

filterResponseHeaderValue

protected String filterResponseHeaderValue(String headerName,
                                           String headerValue,
                                           HttpServletRequest request)
从类 ProxyServlet 复制的描述
Extension point for remote server response header filtering. The default implementation returns the header value as is. If null is returned, this header won't be forwarded back to the client.

覆盖:
ProxyServlet 中的 filterResponseHeaderValue
返回:
filteredHeaderValue

getHostHeader

public String getHostHeader()
从类 ProxyServlet 复制的描述
Get the hostHeader.

覆盖:
ProxyServlet 中的 getHostHeader
返回:
the hostHeader

setHostHeader

public void setHostHeader(String hostHeader)
从类 ProxyServlet 复制的描述
Set the hostHeader.

覆盖:
ProxyServlet 中的 setHostHeader
参数:
hostHeader - the hostHeader to set

validateDestination

public boolean validateDestination(String host,
                                   String path)
从类 ProxyServlet 复制的描述
Check the request hostname and path against white- and blacklist.

覆盖:
ProxyServlet 中的 validateDestination
参数:
host - hostname to check
path - path to check
返回:
true if request is allowed to be proxied


Copyright © 2013. All Rights Reserved.