Class MockEventAdmin
java.lang.Object
org.apache.sling.testing.mock.osgi.MockEventAdmin
- All Implemented Interfaces:
org.osgi.service.event.EventAdmin
Mock implementation of
EventAdmin
.
From EventConstants
currently only EventConstants.EVENT_TOPIC
is supported.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
activate
(org.osgi.service.component.ComponentContext componentContext) protected void
bindEventHandler
(org.osgi.service.event.EventHandler eventHandler, Map<String, Object> props) protected void
deactivate
(org.osgi.service.component.ComponentContext componentContext) void
postEvent
(org.osgi.service.event.Event event) void
sendEvent
(org.osgi.service.event.Event event) protected void
unbindEventHandler
(org.osgi.service.event.EventHandler eventHandler, Map<String, Object> props)
-
Constructor Details
-
MockEventAdmin
public MockEventAdmin()
-
-
Method Details
-
activate
protected void activate(org.osgi.service.component.ComponentContext componentContext) -
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext componentContext) -
postEvent
public void postEvent(org.osgi.service.event.Event event) - Specified by:
postEvent
in interfaceorg.osgi.service.event.EventAdmin
-
sendEvent
public void sendEvent(org.osgi.service.event.Event event) - Specified by:
sendEvent
in interfaceorg.osgi.service.event.EventAdmin
-
bindEventHandler
-
unbindEventHandler
-