Issue #6728 - QUIC and HTTP/3
Updates after merge of #7100. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
3329604585
commit
3d6578deee
|
@ -134,11 +134,6 @@ public class ClientConnector extends ContainerLifeCycle
|
|||
return executor;
|
||||
}
|
||||
|
||||
public boolean isIntrinsicallySecure()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setExecutor(Executor executor)
|
||||
{
|
||||
if (isStarted())
|
||||
|
|
|
@ -377,7 +377,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
_selectorManager.endPointClosed(endPoint);
|
||||
}
|
||||
|
||||
public void createEndPoint(SelectableChannel channel, SelectionKey selectionKey) throws IOException
|
||||
void createEndPoint(SelectableChannel channel, SelectionKey selectionKey) throws IOException
|
||||
{
|
||||
EndPoint endPoint = _selectorManager.newEndPoint(channel, this, selectionKey);
|
||||
Object context = selectionKey.attachment();
|
||||
|
@ -402,7 +402,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
LOG.debug("Created {}", endPoint);
|
||||
}
|
||||
|
||||
public void destroyEndPoint(EndPoint endPoint, Throwable cause)
|
||||
void destroyEndPoint(EndPoint endPoint, Throwable cause)
|
||||
{
|
||||
// Waking up the selector is necessary to clean the
|
||||
// cancelled-key set and tell the TCP stack that the
|
||||
|
@ -419,7 +419,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
}
|
||||
}
|
||||
|
||||
public static int safeReadyOps(SelectionKey selectionKey)
|
||||
static int safeReadyOps(SelectionKey selectionKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -432,7 +432,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
}
|
||||
}
|
||||
|
||||
public static int safeInterestOps(SelectionKey selectionKey)
|
||||
static int safeInterestOps(SelectionKey selectionKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -69,11 +69,19 @@ public abstract class QuicConnection extends AbstractConnection
|
|||
protected QuicConnection(Executor executor, Scheduler scheduler, ByteBufferPool byteBufferPool, EndPoint endPoint)
|
||||
{
|
||||
super(endPoint, executor);
|
||||
if (!(endPoint instanceof DatagramChannelEndPoint))
|
||||
throw new IllegalArgumentException("EndPoint must be a " + DatagramChannelEndPoint.class.getSimpleName());
|
||||
this.scheduler = scheduler;
|
||||
this.byteBufferPool = byteBufferPool;
|
||||
this.strategy = new AdaptiveExecutionStrategy(new QuicProducer(), getExecutor());
|
||||
}
|
||||
|
||||
@Override
|
||||
public DatagramChannelEndPoint getEndPoint()
|
||||
{
|
||||
return (DatagramChannelEndPoint)super.getEndPoint();
|
||||
}
|
||||
|
||||
public Scheduler getScheduler()
|
||||
{
|
||||
return scheduler;
|
||||
|
|
|
@ -57,24 +57,6 @@ public interface Callback extends Invocable
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Completes this callback with the given {@link CompletableFuture}.</p>
|
||||
* <p>When the CompletableFuture completes normally, this callback is succeeded;
|
||||
* when the CompletableFuture completes exceptionally, this callback is failed.</p>
|
||||
*
|
||||
* @param completable the CompletableFuture that completes this callback
|
||||
*/
|
||||
default void completeWith(CompletableFuture<?> completable)
|
||||
{
|
||||
completable.whenComplete((o, x) ->
|
||||
{
|
||||
if (x == null)
|
||||
succeeded();
|
||||
else
|
||||
failed(x);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Callback invoked when the operation completes.</p>
|
||||
*
|
||||
|
@ -204,18 +186,6 @@ public interface Callback extends Invocable
|
|||
};
|
||||
}
|
||||
|
||||
static Callback from(InvocationType invocationType, Runnable completed)
|
||||
{
|
||||
return new Completing(invocationType)
|
||||
{
|
||||
@Override
|
||||
public void completed()
|
||||
{
|
||||
completed.run();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Creates a Callback with the given {@code invocationType},
|
||||
* that runs the given {@code Runnable} when it succeeds or fails.</p>
|
||||
|
|
|
@ -125,35 +125,6 @@ public interface Invocable
|
|||
return new ReadyTask(type, task);
|
||||
}
|
||||
|
||||
public static Runnable from(InvocationType type, Runnable task)
|
||||
{
|
||||
class RunnableInvocable implements Runnable, Invocable
|
||||
{
|
||||
private final InvocationType type;
|
||||
private final Runnable task;
|
||||
|
||||
RunnableInvocable(InvocationType type, Runnable task)
|
||||
{
|
||||
this.type = type;
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
task.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InvocationType getInvocationType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
return new RunnableInvocable(type, task);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if the current thread has been tagged as non blocking
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue