]> WPIA git - gigi.git/blobdiff - lib/jetty/org/eclipse/jetty/io/EndPoint.java
updating jetty to jetty-9.2.16.v2016040
[gigi.git] / lib / jetty / org / eclipse / jetty / io / EndPoint.java
index 87adb40be1ff17aafc995bf0f393de58ccbe50d1..c96dcb8b775b1fe122f93c5adfe358722a507127 100644 (file)
@@ -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);
 }