Mercurial > jhg
comparison src/org/tmatesoft/hg/core/SessionContext.java @ 698:822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Tue, 06 Aug 2013 21:18:33 +0200 |
| parents | fba85bc1dfb8 |
| children | a483b2b68a2e |
comparison
equal
deleted
inserted
replaced
| 697:24f4efedc9d5 | 698:822f3a83ff57 |
|---|---|
| 14 * the terms of a license other than GNU General Public License | 14 * the terms of a license other than GNU General Public License |
| 15 * contact TMate Software at support@hg4j.com | 15 * contact TMate Software at support@hg4j.com |
| 16 */ | 16 */ |
| 17 package org.tmatesoft.hg.core; | 17 package org.tmatesoft.hg.core; |
| 18 | 18 |
| 19 import java.net.URI; | |
| 20 | |
| 21 import org.tmatesoft.hg.internal.BasicSessionContext; | |
| 22 import org.tmatesoft.hg.internal.Experimental; | |
| 23 import org.tmatesoft.hg.internal.remote.RemoteConnectorDescriptor; | |
| 24 import org.tmatesoft.hg.repo.HgLookup.RemoteDescriptor; | |
| 19 import org.tmatesoft.hg.util.LogFacility; | 25 import org.tmatesoft.hg.util.LogFacility; |
| 20 import org.tmatesoft.hg.util.Path; | 26 import org.tmatesoft.hg.util.Path; |
| 21 | 27 |
| 22 /** | 28 /** |
| 23 * Access to objects that might need to be shared between various distinct operations ran during the same working session | 29 * Access to objects that might need to be shared between various distinct operations ran during the same working session |
| 65 } | 71 } |
| 66 }; | 72 }; |
| 67 } | 73 } |
| 68 | 74 |
| 69 /** | 75 /** |
| 76 * Work in progress, provisional API. | |
| 77 * | |
| 78 * Provides descriptor that knows how to handle connections of specific kind | |
| 79 * | |
| 80 * FIXME Perhaps, implementation here shall return null for any URI, while the one | |
| 81 * in {@link BasicSessionContext} shall use our internal classes? However, | |
| 82 * present implementation provides support for uris handled in the library itself, and likely | |
| 83 * most clients need this, even if they supply own SessionContext | |
| 84 * | |
| 85 * @return <code>null</code> if supplied URI doesn't point to a remote repository or repositories of that kind are not supported | |
| 86 */ | |
| 87 @Experimental(reason="Work in progress, provisional API") | |
| 88 public RemoteDescriptor getRemoteDescriptor(URI uri) { | |
| 89 return new RemoteConnectorDescriptor.Provider().get(this, uri); | |
| 90 } | |
| 91 | |
| 92 /** | |
| 70 * Providers of the context may implement | 93 * Providers of the context may implement |
| 71 */ | 94 */ |
| 72 public interface Source { | 95 public interface Source { |
| 73 SessionContext getSessionContext(); | 96 SessionContext getSessionContext(); |
| 74 } | 97 } |
