comparison src/org/tmatesoft/hg/internal/remote/Connector.java @ 699:a483b2b68a2e

Provisional APIs and respective implementation for http, https and ssh remote repositories
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 08 Aug 2013 19:18:50 +0200
parents 822f3a83ff57
children
comparison
equal deleted inserted replaced
698:822f3a83ff57 699:a483b2b68a2e
16 */ 16 */
17 package org.tmatesoft.hg.internal.remote; 17 package org.tmatesoft.hg.internal.remote;
18 18
19 import java.io.InputStream; 19 import java.io.InputStream;
20 import java.io.OutputStream; 20 import java.io.OutputStream;
21 import java.net.URI;
22 import java.util.Collection; 21 import java.util.Collection;
23 import java.util.List; 22 import java.util.List;
24 23
24 import org.tmatesoft.hg.auth.HgAuthFailedException;
25 import org.tmatesoft.hg.core.HgRemoteConnectionException; 25 import org.tmatesoft.hg.core.HgRemoteConnectionException;
26 import org.tmatesoft.hg.core.Nodeid; 26 import org.tmatesoft.hg.core.Nodeid;
27 import org.tmatesoft.hg.core.SessionContext; 27 import org.tmatesoft.hg.core.SessionContext;
28 import org.tmatesoft.hg.repo.HgRemoteRepository.Range; 28 import org.tmatesoft.hg.repo.HgRemoteRepository.Range;
29 import org.tmatesoft.hg.repo.HgRemoteRepository.RemoteDescriptor;
29 import org.tmatesoft.hg.repo.HgRuntimeException; 30 import org.tmatesoft.hg.repo.HgRuntimeException;
30 31
31 /** 32 /**
32 * 33 *
33 * @author Artem Tikhomirov 34 * @author Artem Tikhomirov
44 static final String CMD_PUSHKEY = "pushkey"; 45 static final String CMD_PUSHKEY = "pushkey";
45 static final String CMD_LISTKEYS = "listkeys"; 46 static final String CMD_LISTKEYS = "listkeys";
46 static final String NS_BOOKMARKS = "bookmarks"; 47 static final String NS_BOOKMARKS = "bookmarks";
47 static final String NS_PHASES = "phases"; 48 static final String NS_PHASES = "phases";
48 49
49 void init(URI uri, SessionContext sessionContext, Object globalConfig) throws HgRuntimeException; 50 // note, #init shall not assume remote is instanceof RemoteConnectorDescriptor, but Adaptable to it, instead
51 void init(RemoteDescriptor remote, SessionContext sessionContext, Object globalConfig) throws HgRuntimeException;
50 String getServerLocation(); 52 String getServerLocation();
51 // 53 //
52 void connect() throws HgRemoteConnectionException, HgRuntimeException; 54 void connect() throws HgAuthFailedException, HgRemoteConnectionException, HgRuntimeException;
53 void disconnect() throws HgRemoteConnectionException, HgRuntimeException; 55 void disconnect() throws HgRemoteConnectionException, HgRuntimeException;
54 void sessionBegin() throws HgRemoteConnectionException, HgRuntimeException; 56 void sessionBegin() throws HgRemoteConnectionException, HgRuntimeException;
55 void sessionEnd() throws HgRemoteConnectionException, HgRuntimeException; 57 void sessionEnd() throws HgRemoteConnectionException, HgRuntimeException;
56 // 58 //
57 String getCapabilities() throws HgRemoteConnectionException, HgRuntimeException; 59 String getCapabilities() throws HgRemoteConnectionException, HgRuntimeException;