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 Object
implements com.caplin.datasource.publisher.CachingDataProvider
Publishes objects by serialising before sending on the wire.
-
Constructor Summary
ConstructorDescriptionObjectPublisher
(@NotNull SubjectParser<T> subjectParser, @NotNull CachedObjectProvider<S, T> provider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
setPublisher
(@NotNull com.caplin.datasource.publisher.CachingPublisher cachingPublisher)
-
Constructor Details
-
ObjectPublisher
public ObjectPublisher(@NotNull @NotNull SubjectParser<T> subjectParser, @NotNull @NotNull CachedObjectProvider<S, T> provider)
-
-
Method Details
-
setPublisher
public void setPublisher(@NotNull @NotNull com.caplin.datasource.publisher.CachingPublisher cachingPublisher) - Specified by:
setPublisher
in interfacecom.caplin.datasource.publisher.CachingDataProvider
-
onRequest
- Specified by:
onRequest
in interfacecom.caplin.datasource.publisher.CachingDataProvider
-
onDiscard
- Specified by:
onDiscard
in interfacecom.caplin.datasource.publisher.CachingDataProvider
-