Class DisposableWrapper
java.lang.Object
com.github.philippheuer.events4j.api.domain.DisposableWrapper
- All Implemented Interfaces:
IDisposable,IEventSubscription
public class DisposableWrapper extends java.lang.Object implements IEventSubscription
-
Constructor Summary
Constructors Constructor Description DisposableWrapper(IDisposable disposable, java.lang.String id, java.lang.Class eventType, java.util.function.Consumer consumer, java.util.Map<java.lang.String,IEventSubscription> activeSubscriptions) -
Method Summary
Modifier and Type Method Description voiddispose()Disposejava.util.Map<java.lang.String,IEventSubscription>getActiveSubscriptions()java.util.function.ConsumergetConsumer()IDisposablegetDisposable()java.lang.ClassgetEventType()java.lang.StringgetId()booleanisDisposed()java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
DisposableWrapper
public DisposableWrapper(IDisposable disposable, java.lang.String id, java.lang.Class eventType, java.util.function.Consumer consumer, java.util.Map<java.lang.String,IEventSubscription> activeSubscriptions)
-
-
Method Details
-
dispose
public void dispose()Dispose- Specified by:
disposein interfaceIDisposable
-
isDisposed
public boolean isDisposed()- Specified by:
isDisposedin interfaceIDisposable
-
getDisposable
-
getId
public java.lang.String getId()- Specified by:
getIdin interfaceIEventSubscription
-
getEventType
public java.lang.Class getEventType()- Specified by:
getEventTypein interfaceIEventSubscription
-
getConsumer
public java.util.function.Consumer getConsumer()- Specified by:
getConsumerin interfaceIEventSubscription
-
getActiveSubscriptions
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-