org.apache.lens.server
Class EventServiceImpl

java.lang.Object
  extended by org.apache.hive.service.AbstractService
      extended by org.apache.lens.server.EventServiceImpl
All Implemented Interfaces:
org.apache.hive.service.Service, LensEventService

public class EventServiceImpl
extends org.apache.hive.service.AbstractService
implements LensEventService

Implementation of LensEventService


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hive.service.Service
org.apache.hive.service.Service.STATE
 
Field Summary
static org.apache.commons.logging.Log LOG
          The Constant LOG.
 
Fields inherited from interface org.apache.lens.server.api.events.LensEventService
NAME
 
Constructor Summary
EventServiceImpl(String name)
          Instantiates a new event service impl.
 
Method Summary
<T extends LensEvent>
void
addListenerForType(LensEventListener<? super T> listener, Class<T> eventType)
           
 Map<Class<? extends LensEvent>,List<LensEventListener>> getEventListeners()
           
<T extends LensEvent>
Collection<LensEventListener>
getListeners(Class<T> eventType)
           
 void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
           
 void notifyEvent(LensEvent evt)
           
 void removeListener(LensEventListener listener)
           
<T extends LensEvent>
void
removeListenerForType(LensEventListener<? super T> listener, Class<T> eventType)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.apache.hive.service.AbstractService
getHiveConf, getName, getServiceState, getStartTime, register, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
The Constant LOG.

Constructor Detail

EventServiceImpl

public EventServiceImpl(String name)
Instantiates a new event service impl.

Parameters:
name - the name
Method Detail

init

public void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
Specified by:
init in interface org.apache.hive.service.Service
Overrides:
init in class org.apache.hive.service.AbstractService

removeListener

public void removeListener(LensEventListener listener)
Specified by:
removeListener in interface LensEventService

notifyEvent

public void notifyEvent(LensEvent evt)
                 throws org.apache.lens.api.LensException
Specified by:
notifyEvent in interface LensEventService
Throws:
org.apache.lens.api.LensException

getListeners

public <T extends LensEvent> Collection<LensEventListener> getListeners(Class<T> eventType)
Specified by:
getListeners in interface LensEventService

start

public void start()
Specified by:
start in interface org.apache.hive.service.Service
Overrides:
start in class org.apache.hive.service.AbstractService

stop

public void stop()
Specified by:
stop in interface org.apache.hive.service.Service
Overrides:
stop in class org.apache.hive.service.AbstractService

getEventListeners

public Map<Class<? extends LensEvent>,List<LensEventListener>> getEventListeners()

addListenerForType

public <T extends LensEvent> void addListenerForType(LensEventListener<? super T> listener,
                                                     Class<T> eventType)
Specified by:
addListenerForType in interface LensEventService

removeListenerForType

public <T extends LensEvent> void removeListenerForType(LensEventListener<? super T> listener,
                                                        Class<T> eventType)
Specified by:
removeListenerForType in interface LensEventService


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.