package ovm.core.domain;

import ovm.core.repository.JavaNames;
/**
 * A <tt>RealtimeJavaUserDomain</tt> is a Java user-domain that supports the 
 * execution of a Java Virtual Machine, that implements the Realtime
 * Specification for Java (RTSJ).
 */
public interface RealtimeJavaUserDomain 
    extends JavaUserDomain, RealtimeJavaDomain {

    /**
     * Return a utility object that holds the common system types  of the
     * Realtime Java domain.
     */
    RealtimeJavaTypes commonRealtimeTypes();


    class RealtimeJavaTypes extends JavaTypes {

        public final Type.Scalar javax_realtime_RealtimeThread;

        /**
         * Create a RealtimeJavaTypes object for the given domain
         */
        public RealtimeJavaTypes(Domain d) {
            super(d);
            if (!dom.isExecutive()) {
                Type.Context tc = dom.getSystemTypeContext();
                javax_realtime_RealtimeThread = tc.
                    typeForKnown(JavaNames.javax_realtime_RealtimeThread).asScalar();
            }
            else
                javax_realtime_RealtimeThread = null;
        }
    }

}
