Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-9682-WebSocketBufferLeak
This commit is contained in:
commit
f89defcf2f
|
@ -121,18 +121,6 @@
|
|||
<url-pattern>/dispatch/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>CGI</servlet-name>
|
||||
<servlet-class>org.eclipse.jetty.servlets.CGI</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
<async-supported>true</async-supported>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>CGI</servlet-name>
|
||||
<url-pattern>/cgi-bin/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>Chat</servlet-name>
|
||||
<servlet-class>com.acme.ChatServlet</servlet-class>
|
||||
|
|
|
@ -209,8 +209,11 @@ public class JettyHttpExchangeDelegate extends HttpExchange
|
|||
@Override
|
||||
public void setStreams(InputStream i, OutputStream o)
|
||||
{
|
||||
_is = i;
|
||||
_os = o;
|
||||
assert _is != null;
|
||||
if (i != null)
|
||||
_is = i;
|
||||
if (o != null)
|
||||
_os = o;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -139,6 +139,23 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump
|
|||
executor.execute(task);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get total number of keys from each selector.
|
||||
*
|
||||
* @return total number of selector keys
|
||||
*/
|
||||
@ManagedAttribute(value = "Total number of keys in all selectors", readonly = true)
|
||||
public int getTotalKeys()
|
||||
{
|
||||
int keys = 0;
|
||||
for (final ManagedSelector selector : _selectors)
|
||||
{
|
||||
keys += selector.getTotalKeys();
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the number of selectors in use
|
||||
*/
|
||||
|
@ -506,4 +523,10 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump
|
|||
{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("%s@%x[keys=%d]", getClass().getSimpleName(), hashCode(), getTotalKeys());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,10 @@ import org.slf4j.LoggerFactory;
|
|||
* <dt>ignoreExitState</dt>
|
||||
* <dd>If true then do not act on a non-zero exec exit status")</dd>
|
||||
* </dl>
|
||||
*
|
||||
* @deprecated do not use, no replacement, will be removed in a future release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public class CGI extends HttpServlet
|
||||
{
|
||||
private static final long serialVersionUID = -6182088932884791074L;
|
||||
|
|
Loading…
Reference in New Issue