Package com.caplin.motif.datasource
Class ObjectPublisher<S,T extends SubjectInfo>
- java.lang.Object
-
- com.caplin.motif.datasource.ObjectPublisher<S,T>
-
- Type Parameters:
S
- the type of object this publisher publishesT
- the type ofSubjectInfo
the subject is parsed into
- All Implemented Interfaces:
com.caplin.datasource.publisher.CachingDataProvider
public class ObjectPublisher<S,T extends SubjectInfo> extends java.lang.Object implements com.caplin.datasource.publisher.CachingDataProvider
Publishes objects by serialising before sending on the wire.
-
-
Constructor Summary
Constructors Constructor Description ObjectPublisher(@NotNull SubjectParser<T> subjectParser, @NotNull CachedObjectProvider<S,T> provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onDiscard(java.lang.String subject)
void
onRequest(java.lang.String subject)
void
setPublisher(@NotNull com.caplin.datasource.publisher.CachingPublisher cachingPublisher)
-
-
-
Constructor Detail
-
ObjectPublisher
public ObjectPublisher(@NotNull @NotNull SubjectParser<T> subjectParser, @NotNull @NotNull CachedObjectProvider<S,T> provider)
-
-
Method Detail
-
setPublisher
public void setPublisher(@NotNull @NotNull com.caplin.datasource.publisher.CachingPublisher cachingPublisher)
- Specified by:
setPublisher
in interfacecom.caplin.datasource.publisher.CachingDataProvider
-
onRequest
public void onRequest(java.lang.String subject)
- Specified by:
onRequest
in interfacecom.caplin.datasource.publisher.CachingDataProvider
-
onDiscard
public void onDiscard(java.lang.String subject)
- Specified by:
onDiscard
in interfacecom.caplin.datasource.publisher.CachingDataProvider
-
-