mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-05 13:29:13 +00:00
updated test
This commit is contained in:
parent
e5e3e3300e
commit
923f8d5a37
@ -21,6 +21,7 @@ package org.eclipse.jetty.server;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.Socket;
|
||||
import java.nio.channels.SelectableChannel;
|
||||
import java.nio.channels.SelectionKey;
|
||||
import java.nio.channels.SocketChannel;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@ -35,7 +36,7 @@ import org.eclipse.jetty.io.ChannelEndPoint;
|
||||
import org.eclipse.jetty.io.Connection;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.io.ManagedSelector;
|
||||
import org.eclipse.jetty.io.SelectChannelEndPoint;
|
||||
import org.eclipse.jetty.io.SocketChannelEndPoint;
|
||||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
||||
import org.eclipse.jetty.util.thread.Scheduler;
|
||||
import org.hamcrest.Matchers;
|
||||
@ -60,23 +61,27 @@ public class ExtendedServerTest extends HttpServerTestBase
|
||||
}
|
||||
})
|
||||
{
|
||||
|
||||
@Override
|
||||
protected ChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key) throws IOException
|
||||
{
|
||||
return new ExtendedEndPoint(channel,selectSet,key, getScheduler(), getIdleTimeout());
|
||||
return new ExtendedEndPoint(channel,selectSet,key, getScheduler());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private static class ExtendedEndPoint extends SelectChannelEndPoint
|
||||
private static class ExtendedEndPoint extends SocketChannelEndPoint
|
||||
{
|
||||
private volatile long _lastSelected;
|
||||
|
||||
public ExtendedEndPoint(SocketChannel channel, ManagedSelector selector, SelectionKey key, Scheduler scheduler, long idleTimeout)
|
||||
public ExtendedEndPoint(SelectableChannel channel, ManagedSelector selector, SelectionKey key, Scheduler scheduler)
|
||||
{
|
||||
super(channel,selector,key,scheduler,idleTimeout);
|
||||
super(channel,selector,key,scheduler);
|
||||
}
|
||||
|
||||
public ExtendedEndPoint(SocketChannel channel, ManagedSelector selector, SelectionKey key, Scheduler scheduler)
|
||||
{
|
||||
super(channel,selector,key,scheduler);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user