org.qi4j.library.jmx
Class MBeanServerImporter

java.lang.Object
  extended by org.qi4j.library.jmx.MBeanServerImporter
All Implemented Interfaces:
ServiceImporter

public class MBeanServerImporter
extends java.lang.Object
implements ServiceImporter

Importer for the platform MBeanServer of the JVM.


Constructor Summary
MBeanServerImporter()
           
 
Method Summary
 java.lang.Object importService(ImportedServiceDescriptor serviceDescriptor)
          Imports an instance of the service type described in the service descriptor.
 boolean isAvailable(java.lang.Object instance)
          Ask if the service is available or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanServerImporter

public MBeanServerImporter()
Method Detail

importService

public java.lang.Object importService(ImportedServiceDescriptor serviceDescriptor)
                               throws ServiceImporterException
Description copied from interface: ServiceImporter
Imports an instance of the service type described in the service descriptor.

Specified by:
importService in interface ServiceImporter
Parameters:
serviceDescriptor - The service descriptor.
Returns:
The imported service instance.
Throws:
ServiceImporterException - if import failed.

isAvailable

public boolean isAvailable(java.lang.Object instance)
Description copied from interface: ServiceImporter
Ask if the service is available or not.

Specified by:
isAvailable in interface ServiceImporter
Parameters:
instance - the instance to be checked
Returns:
true if the service is available, false if not