|
16 | 16 | */
|
17 | 17 |
|
18 | 18 | import ch.cyberduck.core.*;
|
19 |
| -import ch.cyberduck.core.azure.AzureProtocol; |
20 |
| -import ch.cyberduck.core.b2.B2Protocol; |
21 |
| -import ch.cyberduck.core.box.BoxProtocol; |
22 |
| -import ch.cyberduck.core.brick.BrickProtocol; |
23 | 19 | import ch.cyberduck.core.cdn.Distribution;
|
24 |
| -import ch.cyberduck.core.ctera.CteraProtocol; |
25 |
| -import ch.cyberduck.core.dav.DAVProtocol; |
26 |
| -import ch.cyberduck.core.dav.DAVSSLProtocol; |
27 |
| -import ch.cyberduck.core.deepbox.DeepboxProtocol; |
28 |
| -import ch.cyberduck.core.dropbox.DropboxProtocol; |
29 | 20 | import ch.cyberduck.core.editor.DefaultEditorListener;
|
30 | 21 | import ch.cyberduck.core.editor.Editor;
|
31 | 22 | import ch.cyberduck.core.editor.EditorFactory;
|
32 | 23 | import ch.cyberduck.core.exception.AccessDeniedException;
|
33 | 24 | import ch.cyberduck.core.exception.BackgroundException;
|
34 | 25 | import ch.cyberduck.core.exception.NotfoundException;
|
35 |
| -import ch.cyberduck.core.ftp.FTPProtocol; |
36 |
| -import ch.cyberduck.core.ftp.FTPTLSProtocol; |
37 |
| -import ch.cyberduck.core.googledrive.DriveProtocol; |
38 |
| -import ch.cyberduck.core.googlestorage.GoogleStorageProtocol; |
39 |
| -import ch.cyberduck.core.hubic.HubicProtocol; |
40 | 26 | import ch.cyberduck.core.io.DisabledStreamListener;
|
41 |
| -import ch.cyberduck.core.irods.IRODSProtocol; |
42 | 27 | import ch.cyberduck.core.local.Application;
|
43 | 28 | import ch.cyberduck.core.local.ApplicationFinder;
|
44 | 29 | import ch.cyberduck.core.local.ApplicationFinderFactory;
|
45 | 30 | import ch.cyberduck.core.local.TemporaryFileServiceFactory;
|
46 | 31 | import ch.cyberduck.core.logging.LoggerPrintStream;
|
47 |
| -import ch.cyberduck.core.manta.MantaProtocol; |
48 |
| -import ch.cyberduck.core.nextcloud.NextcloudProtocol; |
49 |
| -import ch.cyberduck.core.nio.LocalProtocol; |
50 |
| -import ch.cyberduck.core.onedrive.OneDriveProtocol; |
51 |
| -import ch.cyberduck.core.onedrive.SharepointProtocol; |
52 |
| -import ch.cyberduck.core.onedrive.SharepointSiteProtocol; |
53 |
| -import ch.cyberduck.core.openstack.SwiftProtocol; |
54 |
| -import ch.cyberduck.core.owncloud.OwncloudProtocol; |
55 | 32 | import ch.cyberduck.core.pool.SessionPool;
|
56 | 33 | import ch.cyberduck.core.preferences.Preferences;
|
57 | 34 | import ch.cyberduck.core.preferences.PreferencesFactory;
|
58 |
| -import ch.cyberduck.core.s3.S3Protocol; |
59 |
| -import ch.cyberduck.core.sds.SDSProtocol; |
60 |
| -import ch.cyberduck.core.sftp.SFTPProtocol; |
61 |
| -import ch.cyberduck.core.smb.SMBProtocol; |
62 |
| -import ch.cyberduck.core.spectra.SpectraProtocol; |
63 | 35 | import ch.cyberduck.core.ssl.CertificateStoreX509TrustManager;
|
64 | 36 | import ch.cyberduck.core.ssl.DefaultTrustManagerHostnameCallback;
|
65 | 37 | import ch.cyberduck.core.ssl.PreferencesX509KeyManager;
|
66 |
| -import ch.cyberduck.core.storegate.StoregateProtocol; |
67 | 38 | import ch.cyberduck.core.threading.DisabledAlertCallback;
|
68 | 39 | import ch.cyberduck.core.threading.DisconnectBackgroundAction;
|
69 | 40 | import ch.cyberduck.core.threading.SessionBackgroundAction;
|
|
103 | 74 | import java.util.EnumSet;
|
104 | 75 | import java.util.List;
|
105 | 76 | import java.util.Map;
|
| 77 | +import java.util.ServiceLoader; |
106 | 78 | import java.util.concurrent.CountDownLatch;
|
107 | 79 | import java.util.concurrent.ExecutionException;
|
108 | 80 |
|
@@ -135,38 +107,9 @@ public Terminal(final TerminalPreferences defaults, final Options options, final
|
135 | 107 | public Terminal(final ProtocolFactory protocols, final TerminalPreferences defaults, final Options options, final CommandLine input) {
|
136 | 108 | this.protocols = protocols;
|
137 | 109 | this.preferences = defaults.withDefaults(input);
|
138 |
| - this.protocols.register( |
139 |
| - new FTPProtocol(), |
140 |
| - new FTPTLSProtocol(), |
141 |
| - new SFTPProtocol(), |
142 |
| - new DAVProtocol(), |
143 |
| - new DAVSSLProtocol(), |
144 |
| - new SMBProtocol(), |
145 |
| - new SwiftProtocol(), |
146 |
| - new S3Protocol(), |
147 |
| - new GoogleStorageProtocol(), |
148 |
| - new AzureProtocol(), |
149 |
| - new IRODSProtocol(), |
150 |
| - new SpectraProtocol(), |
151 |
| - new B2Protocol(), |
152 |
| - new DriveProtocol(), |
153 |
| - new HubicProtocol(), |
154 |
| - new DropboxProtocol(), |
155 |
| - new DropboxProtocol(), |
156 |
| - new OneDriveProtocol(), |
157 |
| - new SharepointProtocol(), |
158 |
| - new SharepointSiteProtocol(), |
159 |
| - new LocalProtocol(), |
160 |
| - new SDSProtocol(), |
161 |
| - new MantaProtocol(), |
162 |
| - new StoregateProtocol(), |
163 |
| - new BrickProtocol(), |
164 |
| - new NextcloudProtocol(), |
165 |
| - new OwncloudProtocol(), |
166 |
| - new CteraProtocol(), |
167 |
| - new BoxProtocol(), |
168 |
| - new DeepboxProtocol() |
169 |
| - ); |
| 110 | + for(Protocol p : ServiceLoader.load(Protocol.class)) { |
| 111 | + protocols.register(p); |
| 112 | + } |
170 | 113 | this.options = options;
|
171 | 114 | log.info("Parsed options {} from input {}", options, input);
|
172 | 115 | this.input = input;
|
|
0 commit comments