public class SportsFeedClient
extends java.lang.Object
Constructor and Description |
---|
SportsFeedClient(jayeson.lib.delivery.module.subscriber.ISubscriber subscriber,
jayeson.lib.sports.receive.SportsFeedInConfig config,
FeedView<IBetMatch> viewTemplate,
jayeson.lib.sports.receive.InEndPointEventHandler eventHandler,
jayeson.lib.sports.receive.SportsFeedInProcessor inProcessor,
java.util.concurrent.ScheduledExecutorService executor) |
Modifier and Type | Method and Description |
---|---|
jayeson.lib.delivery.module.subscriber.ISubscriber |
getSubscriber()
Retrieve subscriber which is responsible for reading stream and connect to the stream
|
void |
onSwitchFilterFail(int requestId) |
void |
onSwitchFilterStart(int requestId) |
<M extends IBetMatch> |
removeView(FeedView<M> view)
Releases the resources associated with the view.
|
java.util.Map<java.util.concurrent.CompletableFuture<java.lang.Void>,jayeson.lib.delivery.api.IEndPoint> |
sendKeepAlive()
Sends keepalive and returns a future which will complete upon receiving a response.
|
java.util.Map<java.util.concurrent.CompletableFuture<java.lang.Void>,jayeson.lib.delivery.api.IEndPoint> |
sendKeepAlive(long timeOut)
Sends keepalive and returns a future which will complete upon receiving a response.
|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
setUpStreamFilter(jayeson.lib.sports.codec.FilterData filterData)
Set this filter to upstream.
|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
setUpStreamFilter(jayeson.lib.sports.codec.FilterData filterData,
boolean initialFilter)
Set this filter to upstream.
|
void |
start()
Starts Subscriber
|
<M extends IBetMatch> |
view(java.lang.Class<M> clazz)
Create view without filter
|
<M extends IBetMatch> |
view(jayeson.model.IDataFilter filter,
java.lang.Class<M> clazz)
Create a view with filter
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onDeleteEvent, onDeleteMatch, onDeleteOdd, onFullSnapshotEnd, onFullSnapshotStart, onInsertEvent, onInsertMatch, onInsertOdd, onRefresh, onReset, onSwitchFilterEnd, onSwitchFilterFail, onSwitchFilterStart, onUpdateEvent, onUpdateMatch, onUpdateOdd
@Inject public SportsFeedClient(jayeson.lib.delivery.module.subscriber.ISubscriber subscriber, jayeson.lib.sports.receive.SportsFeedInConfig config, FeedView<IBetMatch> viewTemplate, jayeson.lib.sports.receive.InEndPointEventHandler eventHandler, jayeson.lib.sports.receive.SportsFeedInProcessor inProcessor, java.util.concurrent.ScheduledExecutorService executor)
public java.util.concurrent.CompletableFuture<java.lang.Boolean> setUpStreamFilter(jayeson.lib.sports.codec.FilterData filterData)
filterData
- - rulespublic java.util.concurrent.CompletableFuture<java.lang.Boolean> setUpStreamFilter(jayeson.lib.sports.codec.FilterData filterData, boolean initialFilter)
filterData
- The filtersinitialFilter
- Whether it is initial filter or notpublic void onSwitchFilterFail(int requestId)
public void onSwitchFilterStart(int requestId)
public jayeson.lib.delivery.module.subscriber.ISubscriber getSubscriber()
public void start()
public <M extends IBetMatch> FeedView<M> view(java.lang.Class<M> clazz)
clazz
- - can be one of IBetMatch/IB2Match/(Sports specific match like SoccerMatch/TennisMatch/BasketballMatch)public <M extends IBetMatch> FeedView<M> view(jayeson.model.IDataFilter filter, java.lang.Class<M> clazz)
clazz
- - can be one of IBetMatch/IB2Match/(Sports specific match like SoccerMatch/TennisMatch/BasketballMatch)public <M extends IBetMatch> void removeView(FeedView<M> view)
view
- public java.util.Map<java.util.concurrent.CompletableFuture<java.lang.Void>,jayeson.lib.delivery.api.IEndPoint> sendKeepAlive()
public java.util.Map<java.util.concurrent.CompletableFuture<java.lang.Void>,jayeson.lib.delivery.api.IEndPoint> sendKeepAlive(long timeOut)
timeOut
-