Qwylt

java.lang.module.spi
Class EventDispatcher

java.lang.Object
  extended by java.lang.module.spi.EventDispatcher

public class EventDispatcher
extends java.lang.Object

Event dispatcher.

Since:
Jul 8, 2009
Author:
Bryan Atsatt. Copyright (c) 2009 Oracle.

Constructor Summary
EventDispatcher()
           
 
Method Summary
static void fireArchiveInstalled(ModuleArchive archive)
           
static void fireArchiveUninstalled(ModuleArchive archive)
           
static void fireClassDefined(ClassSpace space, java.lang.Class cls)
           
static void fireClassError(ClassSpace space, java.lang.String className, java.lang.Throwable error)
           
static void fireClassFound(ClassSpace space, java.lang.Class cls)
           
static void fireLibraryFound(ResourceSpace space, java.io.File library)
           
static void fireLibraryNotFound(ResourceSpace space, java.lang.String libraryName)
           
static void fireModuleCreated(Module module)
           
static void fireModuleCreationFailed(ModuleArchive archive, ConnectionError error)
           
static void fireModuleReleased(Module module)
           
static void firePackageDefined(ClassSpace space, java.lang.Package pkg)
           
static void fireRepositoryClosed(ModuleRepository repository)
           
static void fireRepositoryOpened(ModuleRepository repository)
           
static void fireResourceDataFound(ResourceSpace space, java.nio.ByteBuffer resource)
           
static void fireResourceFound(ResourceSpace space, java.net.URL resource)
           
static void fireResourceNotFound(ResourceSpace space, java.lang.String resourcePath)
           
static void fireResourcesFound(ResourceSpace space, java.util.Enumeration<java.net.URL> resources)
           
static void fireServiceAdded(ServiceSpace space, ServiceType type, java.lang.Object service)
           
static void fireServiceRemoved(ServiceSpace space, ServiceType type, java.lang.Object service)
           
static java.util.List<EventListener.LifeCycle> getLifeCycleListeners()
          Returns the list of LifeCycle listeners.
static long getRepositoryUpdateCount()
          Returns the repository update count.
static java.util.List<EventListener.Search> getSearchListeners()
          Returns the list of LifeCycle listeners.
static boolean register(EventListener.LifeCycle listener)
          Register a listener.
static boolean register(EventListener.Search listener)
          Register a listener.
static boolean unregister(EventListener.LifeCycle listener)
          Unregister a listener.
static boolean unregister(EventListener.Search listener)
          Unregister a listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventDispatcher

public EventDispatcher()
Method Detail

getRepositoryUpdateCount

public static long getRepositoryUpdateCount()
Returns the repository update count.

Returns:
The count.

getLifeCycleListeners

public static java.util.List<EventListener.LifeCycle> getLifeCycleListeners()
Returns the list of LifeCycle listeners.

Returns:
The listeners.

getSearchListeners

public static java.util.List<EventListener.Search> getSearchListeners()
Returns the list of LifeCycle listeners.

Returns:
The listeners.

register

public static boolean register(EventListener.LifeCycle listener)
Register a listener.

Parameters:
listener - The listener.
Returns:
true if registered, false if already registered.

register

public static boolean register(EventListener.Search listener)
Register a listener.

Parameters:
listener - The listener.
Returns:
true if registered, false if already registered.

unregister

public static boolean unregister(EventListener.LifeCycle listener)
Unregister a listener.

Parameters:
listener - The listener.
Returns:
true if unregistered, false if not registered.

unregister

public static boolean unregister(EventListener.Search listener)
Unregister a listener.

Parameters:
listener - The listener.
Returns:
true if unregistered, false if not registered.

fireRepositoryOpened

public static void fireRepositoryOpened(ModuleRepository repository)

fireArchiveInstalled

public static void fireArchiveInstalled(ModuleArchive archive)

fireModuleCreationFailed

public static void fireModuleCreationFailed(ModuleArchive archive,
                                            ConnectionError error)

fireModuleCreated

public static void fireModuleCreated(Module module)

fireServiceAdded

public static void fireServiceAdded(ServiceSpace space,
                                    ServiceType type,
                                    java.lang.Object service)

fireServiceRemoved

public static void fireServiceRemoved(ServiceSpace space,
                                      ServiceType type,
                                      java.lang.Object service)

fireModuleReleased

public static void fireModuleReleased(Module module)

fireArchiveUninstalled

public static void fireArchiveUninstalled(ModuleArchive archive)

fireRepositoryClosed

public static void fireRepositoryClosed(ModuleRepository repository)

fireLibraryFound

public static void fireLibraryFound(ResourceSpace space,
                                    java.io.File library)

fireLibraryNotFound

public static void fireLibraryNotFound(ResourceSpace space,
                                       java.lang.String libraryName)

fireResourceDataFound

public static void fireResourceDataFound(ResourceSpace space,
                                         java.nio.ByteBuffer resource)

fireResourceFound

public static void fireResourceFound(ResourceSpace space,
                                     java.net.URL resource)

fireResourcesFound

public static void fireResourcesFound(ResourceSpace space,
                                      java.util.Enumeration<java.net.URL> resources)

fireResourceNotFound

public static void fireResourceNotFound(ResourceSpace space,
                                        java.lang.String resourcePath)

firePackageDefined

public static void firePackageDefined(ClassSpace space,
                                      java.lang.Package pkg)

fireClassFound

public static void fireClassFound(ClassSpace space,
                                  java.lang.Class cls)

fireClassDefined

public static void fireClassDefined(ClassSpace space,
                                    java.lang.Class cls)

fireClassError

public static void fireClassError(ClassSpace space,
                                  java.lang.String className,
                                  java.lang.Throwable error)

Qwylt

Send comments or questions to Bryan Atsatt