X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=lib%2Fjetty%2Forg%2Feclipse%2Fjetty%2Fio%2FEndPoint.java;h=c96dcb8b775b1fe122f93c5adfe358722a507127;hp=87adb40be1ff17aafc995bf0f393de58ccbe50d1;hb=ba4f228fa9f72d50991a2218cfd83987ef5d385e;hpb=875b5e9651498a0cd8e0001c0742ba843e47cad0 diff --git a/lib/jetty/org/eclipse/jetty/io/EndPoint.java b/lib/jetty/org/eclipse/jetty/io/EndPoint.java index 87adb40b..c96dcb8b 100644 --- a/lib/jetty/org/eclipse/jetty/io/EndPoint.java +++ b/lib/jetty/org/eclipse/jetty/io/EndPoint.java @@ -1,6 +1,6 @@ // // ======================================================================== -// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd. +// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. // ------------------------------------------------------------------------ // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 @@ -26,8 +26,6 @@ import java.nio.channels.ReadPendingException; import java.nio.channels.WritePendingException; import org.eclipse.jetty.util.Callback; -import org.eclipse.jetty.util.FutureCallback; - /** * @@ -224,6 +222,7 @@ public interface EndPoint extends Closeable /** * @param connection the {@link Connection} associated with this {@link EndPoint} * @see #getConnection() + * @see #upgrade(Connection) */ void setConnection(Connection connection); @@ -239,5 +238,13 @@ public interface EndPoint extends Closeable */ void onClose(); - + + /** Upgrade connections. + * Close the old connection, update the endpoint and open the new connection. + * If the oldConnection is an instance of {@link Connection.UpgradeFrom} then + * a prefilled buffer is requested and passed to the newConnection if it is an instance + * of {@link Connection.UpgradeTo} + * @param newConnection The connection to upgrade to + */ + public void upgrade(Connection newConnection); }