voldemort.server
Class AbstractSocketService

java.lang.Object
  extended by voldemort.common.service.AbstractService
      extended by voldemort.server.AbstractSocketService
All Implemented Interfaces:
VoldemortService
Direct Known Subclasses:
NioSocketService, SocketService

public abstract class AbstractSocketService
extends AbstractService
implements VoldemortService

AbstractSocketService abstracts the different implementations so that we can use this common super class by various callers.


Field Summary
protected  boolean enableJmx
           
protected  int port
           
protected  java.lang.String serviceName
           
 
Constructor Summary
AbstractSocketService(ServiceType type, int port, java.lang.String serviceName, boolean enableJmx)
           
 
Method Summary
protected  void enableJmx(java.lang.Object obj)
          If JMX is enabled, will register the given object under the service name with which this class was created.
 int getPort()
          Simply retrieves the port on which this service is listening for incoming requests.
abstract  StatusManager getStatusManager()
          Returns a StatusManager instance for use with status reporting tools.
 
Methods inherited from class voldemort.common.service.AbstractService
getType, isStarted, start, startInner, stop, stopInner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface voldemort.common.service.VoldemortService
getType, isStarted, start, stop
 

Field Detail

port

protected final int port

serviceName

protected final java.lang.String serviceName

enableJmx

protected final boolean enableJmx
Constructor Detail

AbstractSocketService

public AbstractSocketService(ServiceType type,
                             int port,
                             java.lang.String serviceName,
                             boolean enableJmx)
Method Detail

getPort

public final int getPort()
Simply retrieves the port on which this service is listening for incoming requests.

Returns:
Port number

getStatusManager

public abstract StatusManager getStatusManager()
Returns a StatusManager instance for use with status reporting tools.

Returns:
StatusManager

enableJmx

protected void enableJmx(java.lang.Object obj)
If JMX is enabled, will register the given object under the service name with which this class was created.

Parameters:
obj - Object to register as an MBean


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu