Show / Hide Table of Contents

Class MessageEndpointListener

A listener class that accepts incoming replicators that use the MessageEndpoint class as their endpoint. Discovery and initial connection must be handled by the application, but once that is finished the connection can then be passed to the listener via the Accept(IMessageEndpointConnection) method.

Inheritance
System.Object
MessageEndpointListener
Implements
IChangeObservable<MessageEndpointListenerChangedEventArgs>
IChangeObservableRemovable
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: Couchbase.Lite.P2P
Assembly: Couchbase.Lite.dll
Syntax
public sealed class MessageEndpointListener : IChangeObservable<MessageEndpointListenerChangedEventArgs>, IChangeObservableRemovable
Remarks

NOTE: This is an enterprise edition feature

Constructors

| Improve this Doc View Source

MessageEndpointListener(MessageEndpointListenerConfiguration)

Constructor

Declaration
public MessageEndpointListener(MessageEndpointListenerConfiguration config)
Parameters
Type Name Description
MessageEndpointListenerConfiguration config

The configuration object with the details of the object to be created

Remarks

NOTE: This is an enterprise edition feature

Properties

| Improve this Doc View Source

Connections

Gets a list of connections that this listener is currently serving

Declaration
public IReadOnlyCollection<IMessageEndpointConnection> Connections { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<IMessageEndpointConnection>
Remarks

NOTE: This is an enterprise edition feature

Methods

| Improve this Doc View Source

Accept(IMessageEndpointConnection)

Accepts an incoming connection to the listener, and starts the server side replication process

Declaration
public void Accept(IMessageEndpointConnection connection)
Parameters
Type Name Description
IMessageEndpointConnection connection

The incoming connection

Remarks

NOTE: This is an enterprise edition feature

| Improve this Doc View Source

AddChangeListener(EventHandler<MessageEndpointListenerChangedEventArgs>)

Adds a change listener that tracks changes in the listener for any active replication

Declaration
public ListenerToken AddChangeListener(EventHandler<MessageEndpointListenerChangedEventArgs> handler)
Parameters
Type Name Description
System.EventHandler<MessageEndpointListenerChangedEventArgs> handler

The callback to handle the change

Returns
Type Description
ListenerToken

A token that can be used to remove the change listener later

Remarks

NOTE: This is an enterprise edition feature

| Improve this Doc View Source

AddChangeListener(TaskScheduler, EventHandler<MessageEndpointListenerChangedEventArgs>)

Adds a change listener that tracks changes in the listener for any active replication

Declaration
public ListenerToken AddChangeListener(TaskScheduler scheduler, EventHandler<MessageEndpointListenerChangedEventArgs> handler)
Parameters
Type Name Description
System.Threading.Tasks.TaskScheduler scheduler

The task scheduler to use when firing the callback

System.EventHandler<MessageEndpointListenerChangedEventArgs> handler

The callback to handle the change

Returns
Type Description
ListenerToken

A token that can be used to remove the change listener later

Remarks

NOTE: This is an enterprise edition feature

| Improve this Doc View Source

Close(IMessageEndpointConnection)

Stops the replicator and closes the given connection

Declaration
public void Close(IMessageEndpointConnection connection)
Parameters
Type Name Description
IMessageEndpointConnection connection

The connection for which to stop the replicator and close

Remarks

NOTE: This is an enterprise edition feature

| Improve this Doc View Source

CloseAll()

Stops all replicators and closes all connections

Declaration
public void CloseAll()
Remarks

NOTE: This is an enterprise edition feature

| Improve this Doc View Source

RemoveChangeListener(ListenerToken)

Removes a change listener that was previously added by AddChangeListener(EventHandler<MessageEndpointListenerChangedEventArgs>)

Declaration
public void RemoveChangeListener(ListenerToken token)
Parameters
Type Name Description
ListenerToken token
Remarks

NOTE: This is an enterprise edition feature

| Improve this Doc View Source

Stop()

Declaration
public void Stop()

Implements

IChangeObservable<TEventType>
IChangeObservableRemovable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX