net.sf.asyncobjects.util.callbacks
Class ListenerAdapter<Event>

java.lang.Object
  extended by net.sf.asyncobjects.util.callbacks.ListenerAdapter<Event>
Type Parameters:
Event - an event type
All Implemented Interfaces:
ExplicitSharing

public abstract class ListenerAdapter<Event>
extends Object
implements ExplicitSharing

An adapter for listeners class

Author:
const

Nested Class Summary
 class ListenerAdapter.InternalListenerAdapter
          An internal class that addapt Adapter calss to asynchronous interface.
 
Constructor Summary
ListenerAdapter()
           
 
Method Summary
 AListener<Event> export()
           
protected abstract  void onEvent(Event event)
          This callback is invoked when specifie event happens.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListenerAdapter

public ListenerAdapter()
Method Detail

onEvent

protected abstract void onEvent(Event event)
                         throws Throwable
This callback is invoked when specifie event happens.

Parameters:
event - an event
Throws:
Throwable - if there is a problem

export

public final AListener<Event> export()
Returns:
an action exported as asynchronous interface


Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.