X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fjetty%2Forg%2Feclipse%2Fjetty%2Fserver%2FConnectionFactory.java;fp=lib%2Fjetty%2Forg%2Feclipse%2Fjetty%2Fserver%2FConnectionFactory.java;h=e23739d899368c4ad10b2120431f54ed061f2d7b;hb=73ef54a38e3930a1a789cdc6b5fa23cdd4c9d086;hp=0000000000000000000000000000000000000000;hpb=515007c7c1351045420669d65b59c08fa46850f2;p=gigi.git diff --git a/lib/jetty/org/eclipse/jetty/server/ConnectionFactory.java b/lib/jetty/org/eclipse/jetty/server/ConnectionFactory.java new file mode 100644 index 00000000..e23739d8 --- /dev/null +++ b/lib/jetty/org/eclipse/jetty/server/ConnectionFactory.java @@ -0,0 +1,57 @@ +// +// ======================================================================== +// Copyright (c) 1995-2014 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 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.server; + + +import org.eclipse.jetty.io.Connection; +import org.eclipse.jetty.io.EndPoint; + +/** + *

A Factory to create {@link Connection} instances for {@link Connector}s.

+ *

A Connection factory is responsible for instantiating and configuring a {@link Connection} instance + * to handle an {@link EndPoint} accepted by a {@link Connector}.

+ *

+ * A ConnectionFactory has a protocol name that represents the protocol of the Connections + * created. Example of protocol names include:

+ *
http
Creates a HTTP connection that can handle multiple versions of HTTP from 0.9 to 1.1
+ *
spdy/2
Creates a HTTP connection that handles a specific version of the SPDY protocol
+ *
SSL-XYZ
Create an SSL connection chained to a connection obtained from a connection factory + * with a protocol "XYZ".
+ *
SSL-http
Create an SSL connection chained to a HTTP connection (aka https)
+ *
SSL-npn
Create an SSL connection chained to a NPN connection, that uses a negotiation with + * the client to determine the next protocol.
+ *
+ */ +public interface ConnectionFactory +{ + /* ------------------------------------------------------------ */ + /** + * @return A string representing the protocol name. + */ + public String getProtocol(); + + /** + *

Creates a new {@link Connection} with the given parameters

+ * @param connector The {@link Connector} creating this connection + * @param endPoint the {@link EndPoint} associated with the connection + * @return a new {@link Connection} + */ + public Connection newConnection(Connector connector, EndPoint endPoint); + +}