public class WebSocketSettledPaymentHandler extends BaseWebSocketSettledHandler<PaymentListener>
Used when there exists a local payment handler.
The class maintains a map of registered payment listeners and cleans up itself after related invoice have expired. Regular usage should unregister itself when disconnecting.expiringListeners, paymentListenerMap
Constructor and Description |
---|
WebSocketSettledPaymentHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
registerListener(PaymentListener paymentListener)
Abstract method to register in related event handler.
|
protected void |
unregisterListener(PaymentListener paymentListener)
Abstract method to unregister in related event handler.
|
hasPaymentListener, registerPaymentListener, unregisterPaymentListener
protected void registerListener(PaymentListener paymentListener) throws InternalErrorException
BaseWebSocketSettledHandler
registerListener
in class BaseWebSocketSettledHandler<PaymentListener>
paymentListener
- the event listener to register, depending on type.InternalErrorException
- thrown by underlying event handler.protected void unregisterListener(PaymentListener paymentListener) throws InternalErrorException
BaseWebSocketSettledHandler
unregisterListener
in class BaseWebSocketSettledHandler<PaymentListener>
paymentListener
- the event listener to unregister, depending on type.InternalErrorException
- thrown by underlying event handler.