equal
deleted
inserted
replaced
|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
|
2 // Use of this source code is governed by a BSD-style license that can be |
|
3 // found in the LICENSE file. |
|
4 |
|
5 package org.chromium.sdk.internal; |
|
6 |
|
7 import java.io.IOException; |
|
8 |
|
9 import org.chromium.sdk.internal.transport.Connection; |
|
10 import org.chromium.sdk.internal.transport.Connection.NetListener; |
|
11 |
|
12 /** |
|
13 * Factory that can be used when several connections to the same |
|
14 * endpoint are needed. {@link Connection} does not support reconnection, and |
|
15 * this factory can be used instead. |
|
16 */ |
|
17 public interface ConnectionFactory { |
|
18 /** |
|
19 * Creates new connection and starts it. Does not check whether previous connection |
|
20 * has already finished. |
|
21 * @return already started connection with netListener set |
|
22 */ |
|
23 Connection newOpenConnection(NetListener netListener) throws IOException; |
|
24 } |