//
// ========================================================================
-// 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
import java.nio.channels.WritePendingException;
import org.eclipse.jetty.util.Callback;
-import org.eclipse.jetty.util.FutureCallback;
-
/**
*
/**
* @param connection the {@link Connection} associated with this {@link EndPoint}
* @see #getConnection()
+ * @see #upgrade(Connection)
*/
void setConnection(Connection connection);
*/
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);
}