org.jvnet.hk2.osgiadapter
Class OSGiModuleImpl

java.lang.Object
  extended by org.jvnet.hk2.osgiadapter.OSGiModuleImpl
All Implemented Interfaces:
com.sun.enterprise.module.Module

public final class OSGiModuleImpl
extends java.lang.Object
implements com.sun.enterprise.module.Module

Author:
Sanjeeb.Sahoo@Sun.COM

Constructor Summary
OSGiModuleImpl(OSGiModulesRegistryImpl registry, org.osgi.framework.Bundle bundle, com.sun.enterprise.module.ModuleDefinition md)
           
 
Method Summary
 void addImport(com.sun.enterprise.module.Module module)
           
 com.sun.enterprise.module.Module addImport(com.sun.enterprise.module.ModuleDependency dependency)
           
 void addListener(com.sun.enterprise.module.ModuleChangeListener listener)
           
 void detach()
           
 void dumpState(java.io.PrintStream writer)
           
 boolean equals(java.lang.Object obj)
           
 org.osgi.framework.Bundle getBundle()
           
 java.lang.ClassLoader getClassLoader()
           
 java.util.List<com.sun.enterprise.module.Module> getImports()
           
 com.sun.enterprise.module.ModuleMetadata getMetadata()
           
 com.sun.enterprise.module.ModuleDefinition getModuleDefinition()
           
 java.lang.String getName()
           
<T> java.lang.Iterable<java.lang.Class<? extends T>>
getProvidersClass(java.lang.Class<T> serviceClass)
           
 java.lang.Iterable<java.lang.Class> getProvidersClass(java.lang.String name)
           
 com.sun.enterprise.module.ModulesRegistry getRegistry()
           
 com.sun.enterprise.module.ModuleState getState()
           
 int hashCode()
           
 boolean hasProvider(java.lang.Class serviceClass)
           
 boolean isShared()
           
 boolean isSticky()
           
 boolean isTransientlyActive()
           
 void refresh()
           
 void removeListener(com.sun.enterprise.module.ModuleChangeListener listener)
           
 void resolve()
           
 void setSticky(boolean sticky)
           
 void start()
           
 boolean stop()
           
 java.lang.String toString()
           
 void uninstall()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OSGiModuleImpl

public OSGiModuleImpl(OSGiModulesRegistryImpl registry,
                      org.osgi.framework.Bundle bundle,
                      com.sun.enterprise.module.ModuleDefinition md)
Method Detail

getModuleDefinition

public com.sun.enterprise.module.ModuleDefinition getModuleDefinition()
Specified by:
getModuleDefinition in interface com.sun.enterprise.module.Module

getName

public java.lang.String getName()
Specified by:
getName in interface com.sun.enterprise.module.Module

getRegistry

public com.sun.enterprise.module.ModulesRegistry getRegistry()
Specified by:
getRegistry in interface com.sun.enterprise.module.Module

getState

public com.sun.enterprise.module.ModuleState getState()
Specified by:
getState in interface com.sun.enterprise.module.Module

resolve

public void resolve()
             throws com.sun.enterprise.module.ResolveError
Specified by:
resolve in interface com.sun.enterprise.module.Module
Throws:
com.sun.enterprise.module.ResolveError

start

public void start()
           throws com.sun.enterprise.module.ResolveError
Specified by:
start in interface com.sun.enterprise.module.Module
Throws:
com.sun.enterprise.module.ResolveError

stop

public boolean stop()
Specified by:
stop in interface com.sun.enterprise.module.Module

detach

public void detach()
Specified by:
detach in interface com.sun.enterprise.module.Module

uninstall

public void uninstall()
Specified by:
uninstall in interface com.sun.enterprise.module.Module

refresh

public void refresh()
Specified by:
refresh in interface com.sun.enterprise.module.Module

getMetadata

public com.sun.enterprise.module.ModuleMetadata getMetadata()
Specified by:
getMetadata in interface com.sun.enterprise.module.Module

getProvidersClass

public <T> java.lang.Iterable<java.lang.Class<? extends T>> getProvidersClass(java.lang.Class<T> serviceClass)
Specified by:
getProvidersClass in interface com.sun.enterprise.module.Module

getProvidersClass

public java.lang.Iterable<java.lang.Class> getProvidersClass(java.lang.String name)
Specified by:
getProvidersClass in interface com.sun.enterprise.module.Module

hasProvider

public boolean hasProvider(java.lang.Class serviceClass)
Specified by:
hasProvider in interface com.sun.enterprise.module.Module

addListener

public void addListener(com.sun.enterprise.module.ModuleChangeListener listener)
Specified by:
addListener in interface com.sun.enterprise.module.Module

removeListener

public void removeListener(com.sun.enterprise.module.ModuleChangeListener listener)
Specified by:
removeListener in interface com.sun.enterprise.module.Module

dumpState

public void dumpState(java.io.PrintStream writer)
Specified by:
dumpState in interface com.sun.enterprise.module.Module

getClassLoader

public java.lang.ClassLoader getClassLoader()
Specified by:
getClassLoader in interface com.sun.enterprise.module.Module

addImport

public void addImport(com.sun.enterprise.module.Module module)
Specified by:
addImport in interface com.sun.enterprise.module.Module

addImport

public com.sun.enterprise.module.Module addImport(com.sun.enterprise.module.ModuleDependency dependency)
Specified by:
addImport in interface com.sun.enterprise.module.Module

isSticky

public boolean isSticky()
Specified by:
isSticky in interface com.sun.enterprise.module.Module

setSticky

public void setSticky(boolean sticky)
Specified by:
setSticky in interface com.sun.enterprise.module.Module

getImports

public java.util.List<com.sun.enterprise.module.Module> getImports()
Specified by:
getImports in interface com.sun.enterprise.module.Module

isShared

public boolean isShared()
Specified by:
isShared in interface com.sun.enterprise.module.Module

getBundle

public org.osgi.framework.Bundle getBundle()

isTransientlyActive

public boolean isTransientlyActive()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2011 Oracle Corporation. All Rights Reserved.