Class AbstractOnDemandService
- java.lang.Object
-
- com.couchbase.client.core.state.AbstractStateMachine<LifecycleState>
-
- com.couchbase.client.core.service.AbstractDynamicService
-
- com.couchbase.client.core.service.AbstractOnDemandService
-
- All Implemented Interfaces:
Service
,Stateful<LifecycleState>
- Direct Known Subclasses:
ConfigService
public abstract class AbstractOnDemandService extends AbstractDynamicService
Abstract implementation of a service which enables and disables endpoints on demand.- Since:
- 1.1.0
- Author:
- Michael Nitschinger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.couchbase.client.core.service.Service
Service.EndpointFactory
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractOnDemandService(String hostname, String bucket, String username, String password, int port, CoreContext ctx, Service.EndpointFactory endpointFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description rx.Observable<LifecycleState>
disconnect()
protected void
dispatch(CouchbaseRequest request)
-
Methods inherited from class com.couchbase.client.core.service.AbstractDynamicService
connect, createEndpoint, diagnostics, endpoints, endpointStates, logIdent, mapping, send, whenState
-
Methods inherited from class com.couchbase.client.core.state.AbstractStateMachine
hasSubscribers, isState, state, states, transitionState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.couchbase.client.core.state.Stateful
hasSubscribers, isState, state, states
-
-
-
-
Constructor Detail
-
AbstractOnDemandService
protected AbstractOnDemandService(String hostname, String bucket, String username, String password, int port, CoreContext ctx, Service.EndpointFactory endpointFactory)
-
-
Method Detail
-
dispatch
protected void dispatch(CouchbaseRequest request)
- Specified by:
dispatch
in classAbstractDynamicService
-
disconnect
public rx.Observable<LifecycleState> disconnect()
Description copied from interface:Service
- Specified by:
disconnect
in interfaceService
- Overrides:
disconnect
in classAbstractDynamicService
- Returns:
- the states of the
Service
after the disconnect process for all enabledEndpoint
s.
-
-