Class HttpReplicator
An HTTP implementation of IReplicator. Assumes the API supported by ReplicationService.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Replicator.Http
Assembly: Lucene.Net.Replicator.dll
Syntax
public class HttpReplicator : HttpClientBase, IReplicator, IDisposable
Remarks
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Constructors
| Improve this Doc View SourceHttpReplicator(String, Int32, String, HttpMessageHandler)
Creates a new HttpReplicator with the given host, port and path. HttpClientBase(String, Int32, String, HttpMessageHandler) for more details.
Declaration
public HttpReplicator(string host, int port, string path, HttpMessageHandler messageHandler = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | host | |
System.Int32 | port | |
System.String | path | |
System.Net.Http.HttpMessageHandler | messageHandler |
HttpReplicator(String, HttpClient)
Creates a new HttpReplicator with the given url
and System.Net.Http.HttpClient.
HttpClientBase(String, HttpClient) for more details.
Declaration
public HttpReplicator(string url, HttpClient client)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | |
System.Net.Http.HttpClient | client |
HttpReplicator(String, HttpMessageHandler)
Creates a new HttpReplicator with the given url. HttpClientBase(String, HttpMessageHandler) for more details.
Declaration
public HttpReplicator(string url, HttpMessageHandler messageHandler = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | |
System.Net.Http.HttpMessageHandler | messageHandler |
Methods
| Improve this Doc View SourceCheckForUpdate(String)
Checks for updates at the remote host.
Declaration
public virtual SessionToken CheckForUpdate(string currentVersion)
Parameters
Type | Name | Description |
---|---|---|
System.String | currentVersion |
Returns
Type | Description |
---|---|
SessionToken |
ObtainFile(String, String, String)
Obtains the given file from it's source at the remote host.
Declaration
public virtual Stream ObtainFile(string sessionId, string source, string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | sessionId | |
System.String | source | |
System.String | fileName |
Returns
Type | Description |
---|---|
System.IO.Stream |
Publish(IRevision)
Not supported.
Declaration
public virtual void Publish(IRevision revision)
Parameters
Type | Name | Description |
---|---|---|
IRevision | revision |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | this replicator implementation does not support remote publishing of revisions |
Release(String)
Releases a session obtained from the remote host.
Declaration
public virtual void Release(string sessionId)
Parameters
Type | Name | Description |
---|---|---|
System.String | sessionId |
Implements
System.IDisposable