...
The Bootloader is only used once in any application environment. An OSID Provider that instantiates other OSID Providers should do so using the OsidRuntime passed to the Providers access the OSID Runtime through their initialize() method of its OsidManagermethods.
Code Block | ||
---|---|---|
| ||
public classinterface MyCalendarManagerorg.osidOsidManager implements org.osid.calendaring.CalendarManagerOsidProfile { public privatevoid initialize(org.osid.logging.LoggingManager logger.OsidRuntimeManager runtime) throws org.osid.ConfigurationErrorException, org.osid.OperationFailedException; public void initialize(org.osid.OsidRuntimeManager runtime) .... } |
Unless overidden, the default initialize() method for classes extending net.okapia.osid.jamocha.spi.AbstractOsidManager provides access to the OSID Runtime.
Code Block |
---|
public abstract class net.okapia.osid.jamocha.spi.AbstractOsidManager throwsimplements org.osid.ConfigurationErrorExceptionOsidManager, org.osid.OperationFailedExceptionOsidProxyManager { /** try { * Initializes this manager. A manager is initialized once at the time of * this.logger = runtime.getOsidManager(OSID.LOGGING, "my.calendar.impl",creation. * * @param runtime the runtime environment * @throws org.osid.ConfigurationErrorException an error with * implementation configuration * @throws org.osid.IllegalStateException this manager has already been * initialized by the <code> OsidLoader </code> * @throws org.osid.NullArgumentException <code> runtime </code> is * <code> null </code> * @throws org.osid.OperationFailedException unable to complete request */ @OSID @Override public void net.okapia.osid.kilimanjaro.Versions.LATEST.getVersion())initialize(org.osid.OsidRuntimeManager runtime) throws org.osid.ConfigurationErrorException, org.osid.OperationFailedException { this.runtime = runtime; } catch (return; } /** * Gets the runtime environment. * * @return the runtime * @throws org.osid.NotFoundExceptionIllegalStateException nfe)This {manager has been closed. */ throw newprotected org.osid.ConfigurationErrorException("calendaring impl not found", nfe); OsidRuntimeManager getRuntime() { return (this.runtime); } } }.... } |