Class SingleValueProviderWrapper<T,S extends SubjectInfo>
- java.lang.Object
-
- com.caplin.motif.datasource.provider.SingleValueProviderWrapper<T,S>
-
- All Implemented Interfaces:
CachedDataProvider<S>
public class SingleValueProviderWrapper<T,S extends SubjectInfo> extends java.lang.Object implements CachedDataProvider<S>
-
-
Constructor Summary
Constructors Constructor Description SingleValueProviderWrapper(SingleValueProvider<T,S> provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialise(SingleValuePublisher<T,S> publisher)
void
onDiscard(S subject)
Called when the last peer subscribed discards the subject.void
onRequest(S subjectInfo)
Called on the initial request when the first peer makes a request.
-
-
-
Constructor Detail
-
SingleValueProviderWrapper
public SingleValueProviderWrapper(SingleValueProvider<T,S> provider)
-
-
Method Detail
-
initialise
public void initialise(SingleValuePublisher<T,S> publisher)
-
onRequest
public void onRequest(S subjectInfo)
Description copied from interface:CachedDataProvider
Called on the initial request when the first peer makes a request.- Specified by:
onRequest
in interfaceCachedDataProvider<T>
- Parameters:
subjectInfo
- The subject that was requested.
-
onDiscard
public void onDiscard(S subject)
Description copied from interface:CachedDataProvider
Called when the last peer subscribed discards the subject.- Specified by:
onDiscard
in interfaceCachedDataProvider<T>
- Parameters:
subject
- The subject that was discarded.
-
-