org.fusesource.hawtdispatch.transport
Class ServiceBase

java.lang.Object
  extended by org.fusesource.hawtdispatch.transport.ServiceBase
Direct Known Subclasses:
TcpTransport, UdpTransport, UdpTransportServer

public abstract class ServiceBase
extends Object

The BaseService provides helpers for dealing async service state.

Author:
Hiram Chirino

Nested Class Summary
static class ServiceBase.STARTING
           
static class ServiceBase.State
           
static class ServiceBase.STOPPING
           
 
Field Summary
protected  ServiceBase.State _serviceState
           
static ServiceBase.State CREATED
           
static ServiceBase.State STARTED
           
static ServiceBase.State STOPPED
           
 
Constructor Summary
ServiceBase()
           
 
Method Summary
protected abstract  void _start(Task onCompleted)
           
protected abstract  void _stop(Task onCompleted)
           
protected abstract  DispatchQueue getDispatchQueue()
           
protected  ServiceBase.State getServiceState()
           
 void start(Runnable onCompleted)
           
 void start(Task onCompleted)
           
 void stop(Runnable onCompleted)
           
 void stop(Task onCompleted)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CREATED

public static final ServiceBase.State CREATED

STARTED

public static final ServiceBase.State STARTED

STOPPED

public static final ServiceBase.State STOPPED

_serviceState

protected ServiceBase.State _serviceState
Constructor Detail

ServiceBase

public ServiceBase()
Method Detail

start

public final void start(Runnable onCompleted)

start

public final void start(Task onCompleted)

stop

public final void stop(Runnable onCompleted)

stop

public final void stop(Task onCompleted)

getServiceState

protected ServiceBase.State getServiceState()

getDispatchQueue

protected abstract DispatchQueue getDispatchQueue()

_start

protected abstract void _start(Task onCompleted)

_stop

protected abstract void _stop(Task onCompleted)


Copyright © 2010-2014 FuseSource, Corp.. All Rights Reserved.