|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ocap.application.AppManagerProxy
public class AppManagerProxy
This class represents the application manager functionality used by the Monitor Application. It provides a means of acquiring application signaling and registering a new unbound application for applications that have MonitorAppPermission.
An application which has MonitorAppPermission may have a subclass of the AppsDatabaseFilter class, a class implementing the AppSignalHandler interface or a class implementing SecurityPolicyHandler interface and may set an instance of them in the AppManagerProxy.
See the section 10 Application Model and 11 Application Signaling in this specification for details.
Constructor Summary | |
---|---|
protected |
AppManagerProxy()
This is a constructor of this class. |
Method Summary | |
---|---|
java.util.Properties |
getAddressingProperties()
Gets the addressing properties previously registered by the registerAddressingProperties method. |
static AppManagerProxy |
getInstance()
This method returns the sole instance of the AppManagerProxy class. |
java.util.Properties |
getSecurityAddressableAttributes()
Gets the security system Host addressable attributes queried by the implementation. |
static int[] |
getSupportedApplicationTypes()
This method returns the set of application types supported by this OCAP implementation. |
void |
registerAddressingProperties(java.util.Properties properties,
boolean persist,
java.util.Date expirationDate)
Registers addressing properties used for comparison when an addressing_descriptor from an AIT or XAIT is evaluated. |
void |
registerUnboundApp(java.io.InputStream xait)
This method registers new unbound application entries. |
void |
removeAddressingProperties(java.lang.String[] properties)
Removes addressing properties set by the registerAddressingProperties method. |
void |
setAppFilter(AppsDatabaseFilter filter)
This method sets an instance of a concrete class that extends AppsDatabaseFilter that decides whether the application is allowed to be launched or not for all applications to be launched. |
void |
setApplicationPriority(int priority,
AppID appId)
This method sets the priority for the application. |
void |
setAppSignalHandler(AppSignalHandler handler)
This method sets an instance of a class that implements the AppSignalHandler interface. |
void |
setSecurityPolicyHandler(SecurityPolicyHandler handler)
This method sets an instance of a class that implements the SecurityPolicyHandler interface. |
void |
unregisterUnboundApp(int serviceId,
AppID appid)
This method unregisters an unbound application from the AppsDatabase. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AppManagerProxy()
getInstance()
method to create an instance.
Method Detail |
---|
public static AppManagerProxy getInstance()
public void setAppFilter(AppsDatabaseFilter filter)
filter
- An instance of a concrete class of the
AppsDatabaseFilter that decides whether the
application is allowed to be launched or not.
If null is set, the AppsDatabaseFilter
will be removed.
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("handler.appFilter")public void setAppSignalHandler(AppSignalHandler handler)
handler
- An instance of a class implementing the
AppSignalHandler interface that decides
whether application information is updated
using the new version of the XAIT or not.
If null is set, the AppSignalHandler be removed.
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("registrar")public void setSecurityPolicyHandler(SecurityPolicyHandler handler)
handler
- An instance of a class implementing
the SecurityPolicyHandler interface
that may modify a set of Permission granted to an application
to be launched.
If null is set, the SecurityPolicyHandler is removed.
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("security")public void registerUnboundApp(java.io.InputStream xait) throws java.io.IOException
This method registers new unbound application entries.
Generally, the ServiceList and, for currently selected abstract services, the AppsDatabase are updated when a new XAIT is received from the network. This method registers new unbound application entries without the network signaled XAIT.
If there has already been an entry in the ServiceList or AppsDatabase registered via the registerUnboundApp(AppID) method with the same combination of an AppID and a service name, the existing entry is replaced by the one specified by this method. Errors in the xait are not indicated to the calling application and incorrect xait information will be treated as described in DVB MHP 1.0.2 Section 10.4.1 Data Errors.
Note that the application entry registered by this method is
processed in the same manner as applications signaled by the
XAIT.
Note that the AppSignalHandler.notifyXAITUpdate(org.ocap.application.OcapAppAttributes[])
method is not called.
xait
- An instance of java.io.InputStream that provides
an XAIT formatted stream. If an XAIT consists of multiple
sections, an instance of java.io.InputStream SHALL provide
simple concatenation of them. All section header values
of each section shall be valid. Sections shall be concatenated
in order of ascending section number. Duplicate sections
should not be included. If duplicates are included in the
java.io.InputStream this method will discard all but the
first occurrence.
java.lang.IllegalArgumentException
- if the InputStream does not represent
a sequence of XAIT sections with valid section headers.
Note that this exception is not thrown when descriptors in the
XAIT are invalid. The descriptors may be analyzed asynchronously.
java.io.IOException
- if an I/O error occurs.
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("registrar")public void unregisterUnboundApp(int serviceId, AppID appid)
This method unregisters an unbound application from the AppsDatabase.
This method unregisters an existing unbound application entry from AppsDatabase without the XAIT signaling. The unbound application entry is specified by an appid and a service_id. The application must have been previously registered by a call to registerUnboundApp(InputStream) from the same application that is making the call to unregisterUnboundApp(AppID).
If there is no specified entry in the service at the time this method is called, this method has no effect. If the application to be unregistered has been launched, it shall be killed.
serviceId
- The service identifier to which this
application is registered.appid
- An AppID instance identifies the application entry
to be unregistered from the service.
java.lang.IllegalArgumentException
- if this method attempts
to modify an application signaled in the XAIT or an AIT
or a host device manufacturer application.
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("registrar")public static int[] getSupportedApplicationTypes()
public void setApplicationPriority(int priority, AppID appId)
priority
- New priority for the application with appId.appId
- Application identifier of the application to have its
priority changed.
java.lang.SecurityException
- is thrown when the caller does not have
MonitorAppPermission("servicemanager").
java.lang.IllegalStateException
- if the application, i.e. Xlet, is
currently set at monitor application priority.public void registerAddressingProperties(java.util.Properties properties, boolean persist, java.util.Date expirationDate)
properties
- The set of properties to be registered.persist
- If true the properties parameters are stored in
persistent storage, otherwise they are not stored and
SHALL be removed immediately if previously stored.expirationDate
- Date the implementation SHALL remove the
properties from persistent storage. Only applies if the
persist parameter is set to true. If the date is in the
past then no expiration date is set.
java.lang.SecurityException
- if the calling application is not
granted MonitorAppPermission("properties").public java.util.Properties getAddressingProperties()
registerAddressingProperties
method. The set of properties
returned by this method may be out of date as soon as this method
returns.
public void removeAddressingProperties(java.lang.String[] properties)
registerAddressingProperties
method. Each String in the
properties parameter SHALL be compared to registered property keys
and if a match is found the property SHALL be removed. If the
properties parameter is null all registered properties SHALL be removed
from both volatile storage and non-volatile storage if persistently
stored.
properties
- The properties to remove.
java.lang.SecurityException
- if the calling application is not granted
MonitorAppPermission("properties").public java.util.Properties getSecurityAddressableAttributes()
Properties
. The set of properties returned by this
method may be out of date as soon as this method returns.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |