public interface RepoTransportFactory
Important: Implementors should not implement this interface directly. Instead,
AbstractRepoTransportFactory should be sub-classed.
|Modifier and Type||Method and Description|
Gets the human-readable long description of this factory.
Gets the human-readable short name of this factory.
Gets the priority of this factory.
Determine, whether the factory (or more precisely its
Factories are sorted primarily by this priority (descending). Thus, the greater the priority as a number the more likely it will be used.
Or in other words: The factory with the highest priority is chosen.
The default implementation in
AbstractRepoTransportFactory returns 0. Thus, if you implement your
own factory and register it for a URL type that is already handled by another factory,
you must return a number greater than the other factory's priority (i.e. usually > 0).
This should be a very short name like "File", "REST", "SOAP", etc. to be listed in a combo box or similar UI element.
null, but implementors are highly discouraged to return
null(or an empty string)!
In contrast to
getName(), this method should provide an elaborate decription. It may be
composed of multiple complete sentences and it may contain line breaks.
null. But implementors are encouraged to provide a meaningful description.
boolean isSupported(URL remoteRoot)
RepoTransports) is able to handle the given URL.
remoteRoot- the URL of the repository. Must not be
null. This does not necessarily mean the repository is on a remote machine. It just means it is somewhere beyond this abstraction layer and might very well be on a remote server.
true, if the URL is supported (i.e. a
RepoTransportcreated by this factory will operate with it);
false, if the URL is not supported.
RepoTransport createRepoTransport(URL remoteRoot, UUID clientRepositoryId)
remoteRoot- the remote-root. Must not be
clientRepositoryId- the client-side repository's ID (i.e. the ID of the repo on the other side). May be
null, if there is no repo (yet) on the other side. Note, that certain methods are not usable, if this is
Copyright © 2013–2018. All rights reserved.