Class MessageEndpointListener
A listener class that accepts incoming replicators that use the Message
Inheritance
Inherited Members
Namespace: Couchbase.Lite.P2P
Assembly: Couchbase.Lite.dll
Syntax
public sealed class MessageEndpointListener : IStoppable
Remarks
NOTE: This is an enterprise edition feature
Constructors
| Improve this Doc View SourceMessageEndpointListener(MessageEndpointListenerConfiguration)
Constructor
Declaration
public MessageEndpointListener(MessageEndpointListenerConfiguration config)
Parameters
Type | Name | Description |
---|---|---|
Message |
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 SourceConnections
Gets a list of connections that this listener is currently serving
Declaration
public IReadOnlyCollection<IMessageEndpointConnection> Connections { get; }
Property Value
Type | Description |
---|---|
System. |
Remarks
NOTE: This is an enterprise edition feature
Methods
| Improve this Doc View SourceAccept(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 |
---|---|---|
IMessage |
connection | The incoming connection |
Remarks
NOTE: This is an enterprise edition feature
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. |
handler | The callback to handle the change |
Returns
Type | Description |
---|---|
Listener |
A token that can be used to remove the change listener later |
Remarks
NOTE: This is an enterprise edition feature
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. |
scheduler | The task scheduler to use when firing the callback |
System. |
handler | The callback to handle the change |
Returns
Type | Description |
---|---|
Listener |
A token that can be used to remove the change listener later |
Remarks
NOTE: This is an enterprise edition feature
Close(IMessageEndpointConnection)
Stops the replicator and closes the given connection
Declaration
public void Close(IMessageEndpointConnection connection)
Parameters
Type | Name | Description |
---|---|---|
IMessage |
connection | The connection for which to stop the replicator and close |
Remarks
NOTE: This is an enterprise edition feature
CloseAll()
Stops all replicators and closes all connections
Declaration
public void CloseAll()
Remarks
NOTE: This is an enterprise edition feature
RemoveChangeListener(ListenerToken)
Removes a change listener that was previously added by AddChangeListener(EventHandler<MessageEndpointListenerChangedEventArgs>)
Declaration
public void RemoveChangeListener(ListenerToken token)
Parameters
Type | Name | Description |
---|---|---|
Listener |
token |
Remarks
NOTE: This is an enterprise edition feature
Stop()
Declaration
public void Stop()