com.maverick.events
Class EventServiceImplementation

java.lang.Object
  extended by com.maverick.events.EventServiceImplementation
All Implemented Interfaces:
EventService

public class EventServiceImplementation
extends java.lang.Object
implements EventService

Event Service Implementation singleton, that manages J2SSH Event Listeners, and allows events to be fired.

Author:
david

Constructor Summary
protected EventServiceImplementation()
           
 
Method Summary
 void addListener(java.lang.String threadPrefix, EventListener listener)
          Add a J2SSH Listener to the list of listeners that will be sent events
 void fireEvent(Event evt)
          Send an SSH Event to each registered listener
static EventService getInstance()
          Get the event service instance
 void removeListener(java.lang.String threadPrefix)
          Remove an EventListener from the list of listeners that are sent events
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventServiceImplementation

protected EventServiceImplementation()
Method Detail

getInstance

public static EventService getInstance()
Get the event service instance

Returns:
EventService

addListener

public void addListener(java.lang.String threadPrefix,
                        EventListener listener)
Add a J2SSH Listener to the list of listeners that will be sent events

Specified by:
addListener in interface EventService
Parameters:
threadPrefix - listen to threads whose name have this prefix, string must not contain any '-' except the final character which must be a '-'.
listener -

removeListener

public void removeListener(java.lang.String threadPrefix)
Remove an EventListener from the list of listeners that are sent events

Specified by:
removeListener in interface EventService

fireEvent

public void fireEvent(Event evt)
Send an SSH Event to each registered listener

Specified by:
fireEvent in interface EventService
Parameters:
evt - event to fire to all listener


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.