001 /* 002 * Copyright 2013 Erik Kuefler 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 005 * in compliance with the License. You may obtain a copy of the License at 006 * 007 * http://www.apache.org/licenses/LICENSE-2.0 008 * 009 * Unless required by applicable law or agreed to in writing, software distributed under the License 010 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 011 * or implied. See the License for the specific language governing permissions and limitations under 012 * the License. 013 */ 014 package com.ekuefler.supereventbus; 015 016 /** 017 * A {@link DeadEvent} wraps an event that was posted to an {@link EventBus}, but for which no 018 * subscribers were registered. Applications can subscribe to {@link DeadEvent} to help identify 019 * misconfiguration issues. Note that if an event had a handler registered for it that was bypassed 020 * due to an {@link com.ekuefler.supereventbus.filtering.EventFilter}, a {@link DeadEvent} will NOT 021 * be fired. Also note that if the application registers a handler for {@link Object}, all events 022 * will be handled, and so {@link DeadEvent} will never be fired. 023 * 024 * @author ekuefler@gmail.com (Erik Kuefler) 025 */ 026 public class DeadEvent { 027 028 private final Object event; 029 030 DeadEvent(Object event) { 031 this.event = event; 032 } 033 034 public Object getEvent() { 035 return event; 036 } 037 }