org.eclipse.corona.core
Class SystemRuntimeContext

java.lang.Object
  extended by org.eclipse.corona.core.SystemRuntimeContext
All Implemented Interfaces:
java.util.EventListener, IRuntimeContext, IRuntimeContextFactory, org.osgi.framework.ServiceFactory, org.osgi.framework.ServiceListener

public class SystemRuntimeContext
extends java.lang.Object
implements IRuntimeContext, IRuntimeContextFactory, org.osgi.framework.ServiceFactory, org.osgi.framework.ServiceListener


Field Summary
static java.lang.String contextName
           
 
Fields inherited from interface org.eclipse.corona.core.IRuntimeContext
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, RuntimeContextEvent, STOPPED, STOPPING, UNINITIALIZED
 
Fields inherited from interface org.eclipse.corona.core.IRuntimeContextFactory
CONTEXT_SERVICE_NAME
 
Method Summary
 org.osgi.framework.ServiceReference[] getAllServiceReferences(org.osgi.framework.BundleContext bc, java.lang.String clazz, java.lang.String filter)
           
 IManagedResource getContainer(java.lang.String name)
           
 IManagedResource getContainer(java.lang.String home, java.lang.String container)
           
 IManagedContainerHome getContainerHome(java.lang.String homeIdentifier)
           
 IRuntimeContext getContext(java.lang.String containerURI)
           
static SystemRuntimeContext getInstance()
           
 IContainerConfiguration getIoCConfig(java.lang.String configPath)
           
 java.lang.String getName()
           
 java.lang.Object getService(org.osgi.framework.BundleContext bc, org.osgi.framework.ServiceReference reference)
           
 java.lang.Object getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration)
           
 org.osgi.framework.ServiceReference getServiceReference(org.osgi.framework.BundleContext bc, java.lang.String clazz)
           
 org.osgi.framework.ServiceReference[] getServiceReferences(org.osgi.framework.BundleContext bc, java.lang.String clazz, java.lang.String filter)
           
 int getState()
           
 org.osgi.framework.ServiceRegistration registerService(org.osgi.framework.BundleContext bc, java.lang.String[] clazzes, java.lang.Object service, java.util.Dictionary properties)
           
 org.osgi.framework.ServiceRegistration registerService(org.osgi.framework.BundleContext bc, java.lang.String clazz, java.lang.Object service, java.util.Dictionary properties)
           
 void serviceChanged(org.osgi.framework.ServiceEvent event)
           
 void start()
           
 void start(org.osgi.framework.BundleContext context)
           
 void stop()
           
 boolean ungetService(org.osgi.framework.BundleContext bc, org.osgi.framework.ServiceReference reference)
           
 void ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration, java.lang.Object service)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contextName

public static java.lang.String contextName
Method Detail

getInstance

public static SystemRuntimeContext getInstance()

getContext

public IRuntimeContext getContext(java.lang.String containerURI)
                           throws CoronaException
Specified by:
getContext in interface IRuntimeContextFactory
Throws:
CoronaException

getName

public java.lang.String getName()

getState

public int getState()
Specified by:
getState in interface IRuntimeContext

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface IRuntimeContext
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface IRuntimeContext
Throws:
java.lang.Exception

getService

public java.lang.Object getService(org.osgi.framework.Bundle bundle,
                                   org.osgi.framework.ServiceRegistration registration)
Specified by:
getService in interface org.osgi.framework.ServiceFactory

ungetService

public void ungetService(org.osgi.framework.Bundle bundle,
                         org.osgi.framework.ServiceRegistration registration,
                         java.lang.Object service)
Specified by:
ungetService in interface org.osgi.framework.ServiceFactory

serviceChanged

public void serviceChanged(org.osgi.framework.ServiceEvent event)
Specified by:
serviceChanged in interface org.osgi.framework.ServiceListener

getIoCConfig

public IContainerConfiguration getIoCConfig(java.lang.String configPath)

getContainerHome

public IManagedContainerHome getContainerHome(java.lang.String homeIdentifier)
Specified by:
getContainerHome in interface IRuntimeContext

getContainer

public IManagedResource getContainer(java.lang.String name)
Specified by:
getContainer in interface IRuntimeContext

getContainer

public IManagedResource getContainer(java.lang.String home,
                                     java.lang.String container)
Specified by:
getContainer in interface IRuntimeContext

registerService

public org.osgi.framework.ServiceRegistration registerService(org.osgi.framework.BundleContext bc,
                                                              java.lang.String[] clazzes,
                                                              java.lang.Object service,
                                                              java.util.Dictionary properties)
Specified by:
registerService in interface IRuntimeContext

registerService

public org.osgi.framework.ServiceRegistration registerService(org.osgi.framework.BundleContext bc,
                                                              java.lang.String clazz,
                                                              java.lang.Object service,
                                                              java.util.Dictionary properties)
Specified by:
registerService in interface IRuntimeContext

getServiceReference

public org.osgi.framework.ServiceReference getServiceReference(org.osgi.framework.BundleContext bc,
                                                               java.lang.String clazz)
Specified by:
getServiceReference in interface IRuntimeContext

getService

public java.lang.Object getService(org.osgi.framework.BundleContext bc,
                                   org.osgi.framework.ServiceReference reference)
Specified by:
getService in interface IRuntimeContext

ungetService

public boolean ungetService(org.osgi.framework.BundleContext bc,
                            org.osgi.framework.ServiceReference reference)
Specified by:
ungetService in interface IRuntimeContext

getServiceReferences

public org.osgi.framework.ServiceReference[] getServiceReferences(org.osgi.framework.BundleContext bc,
                                                                  java.lang.String clazz,
                                                                  java.lang.String filter)
                                                           throws org.osgi.framework.InvalidSyntaxException
Specified by:
getServiceReferences in interface IRuntimeContext
Throws:
org.osgi.framework.InvalidSyntaxException

getAllServiceReferences

public org.osgi.framework.ServiceReference[] getAllServiceReferences(org.osgi.framework.BundleContext bc,
                                                                     java.lang.String clazz,
                                                                     java.lang.String filter)
                                                              throws org.osgi.framework.InvalidSyntaxException
Specified by:
getAllServiceReferences in interface IRuntimeContext
Throws:
org.osgi.framework.InvalidSyntaxException

Copyright 2006 IBM Corporation and others.
All Rights Reserved.