All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.interledger.link.StatefulLink Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package org.interledger.link;

import org.interledger.link.events.LinkConnectionEventListener;

/**
 * 

Defines a {@link Link} that holds connection state and possibly other stateful data. Because this type of {@link * Link} holds a connection, it cannot be load-balance in the typical fashion. For example, a Link with an underlying * Websocket connection cannot easily be transitioned and serviced by another ILP node instance in a different * runtime.

*/ public interface StatefulLink extends Link, Connectable { /** * Add an event listener to this link. * *

Care should be taken when adding multiple listeners to ensure that they perform distinct operations, otherwise * duplicate functionality might be unintentionally introduced.

* * @param eventListener A {@link LinkConnectionEventListener} that can listen for and response to various types of * events emitted by this link. */ void addLinkEventListener(LinkConnectionEventListener eventListener); /** * Removes an event listener from the collection of listeners registered with this link. * * @param eventListener A {@link LinkConnectionEventListener} representing the listener to remove. */ void removeLinkEventListener(LinkConnectionEventListener eventListener); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy