Package org.apache.sling.testing.mock.osgi

# Class MockEventAdmin

java.lang.Object
org.apache.sling.testing.mock.osgi.MockEventAdmin

All Implemented Interfaces:
  `org.osgi.service.event.EventAdmin`

public final class MockEventAdmin extends Object implements org.osgi.service.event.EventAdmin
Mock implementation of `EventAdmin`. From `EventConstants` currently only `EventConstants.EVENT_TOPIC` is supported.

## Constructor Summary

Constructors
Constructor
Description
`MockEventAdmin()`

## Method Summary

Modifier and Type
Method
Description
`protected 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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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 interface `org.osgi.service.event.EventAdmin`

### sendEvent

public void sendEvent(org.osgi.service.event.Event event)

Specified by:
  `sendEvent` in interface `org.osgi.service.event.EventAdmin`

### bindEventHandler

protected void bindEventHandler(org.osgi.service.event.EventHandler eventHandler, Map<String,Object> props)

### unbindEventHandler

protected void unbindEventHandler(org.osgi.service.event.EventHandler eventHandler, Map<String,Object> props)