public class ServiceContextFactoryImpl extends ServiceContextFactory implements ServiceContextListener
ServiceContext objects.| Constructor and Description |
|---|
ServiceContextFactoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
ServiceContext |
createServiceContext()
Creates a
ServiceContext object. |
ServiceContext |
getServiceContext(XletContext ctx)
Reports the
ServiceContext in which the
Xlet corresponding to the specified
XletContext is running. |
ServiceContext[] |
getServiceContexts()
Provides the
ServiceContext instances to which the
caller of the method is permitted access. |
void |
receiveServiceContextEvent(ServiceContextEvent sce)
Removes a
ServiceContext object. |
getInstancepublic ServiceContext createServiceContext() throws InsufficientResourcesException, SecurityException
ServiceContext object. The new
ServiceContext is created in the not
presenting state. Note that implementations may limit the
number of ServiceContext objects to a very small
number, perhaps even one.createServiceContext in class ServiceContextFactoryServiceContext object.InsufficientResourcesException - If the receiver lacks
the resources to create this ServiceContext.SecurityException - if the caller doesn't have
ServiceContextPermission("create")public ServiceContext[] getServiceContexts()
ServiceContext instances to which the
caller of the method is permitted access. If the caller has
ServiceContextPermission("access","*"), then all
current (i.e., undestroyed) ServiceContext instances
are returned. If the application making this call is running in
a ServiceContext and has
ServiceContextPermission("access","own"), its own
ServiceContext will be included in the returned
array. If no ServiceContext instances are
accessible to the caller, a zero-length array is returned. No
ServiceContext instances in the destroyed
state are returned by this method.getServiceContexts in class ServiceContextFactoryServiceContext objects.ServiceContextPermissionpublic ServiceContext getServiceContext(XletContext ctx) throws ServiceContextException
ServiceContext in which the
Xlet corresponding to the specified
XletContext is running. The returned
ServiceContext is the one from which the
Service carrying the Xlet was selected.getServiceContext in class ServiceContextFactoryctx - The XletContext of the Xlet
of interest.ServiceContext in which the Xlet
corresponding to ctx is running.SecurityException - If the
Xlet corresponding to ctx does not have
ServiceContextPermission("access", "own").ServiceContextException - If the
Xlet corresponding to ctx is not running
within a ServiceContext.public void receiveServiceContextEvent(ServiceContextEvent sce)
ServiceContext object. The old
ServiceContext is removed from the factories list
of services contexts. Removed service contexts are generally
those which have been destroyed.receiveServiceContextEvent in interface ServiceContextListenersce - The generated event.Copyright © 2012 code4tv.com. All Rights Reserved.