Class PluginBridge


  • public final class PluginBridge
    extends JNLPFile
    Allows reuse of code that expects a JNLPFile object, while overriding behaviour specific to applets.
    • Constructor Detail

      • PluginBridge

        public PluginBridge​(java.net.URL codebase,
                            java.net.URL documentBase,
                            java.lang.String jar,
                            java.lang.String main,
                            int width,
                            int height,
                            PluginParameters params)
                     throws java.lang.Exception
        Creates a new PluginBridge using a default JNLPCreator.
        Parameters:
        codebase - as specified in attribute
        documentBase - as specified in attribute
        jar - jar attribute value
        main - main method attribute value
        width - width of appelt as specified in attribute
        height - height of applet as specified in attribute
        params - parameters as parsed from source html
        Throws:
        java.lang.Exception - general exception as anything can happen
      • PluginBridge

        public PluginBridge​(java.net.URL codebase,
                            java.net.URL documentBase,
                            java.lang.String archive,
                            java.lang.String main,
                            int width,
                            int height,
                            PluginParameters params,
                            JNLPCreator jnlpCreator)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getArchiveJars

        public java.util.List<java.lang.String> getArchiveJars()
      • codeBaseLookup

        public boolean codeBaseLookup()
      • useJNLPHref

        public boolean useJNLPHref()
      • getTitle

        public java.lang.String getTitle()
        Overrides:
        getTitle in class JNLPFile
        Returns:
        the JNLP file's best localized title. This method returns the same value as InformationDesc.getTitle(). Since jdk7 u45, also manifest title, and mainclass are taken to consideration; See PluginBridge
      • getResources

        public ResourcesDesc getResources​(java.util.Locale locale,
                                          java.lang.String os,
                                          java.lang.String arch)
        Overrides:
        getResources in class JNLPFile
        Parameters:
        locale - preferred locale of resource
        os - preferred os of resource
        arch - preferred arch of resource
        Returns:
        the resources section of the JNLP file for the specified locale, os, and arch.
      • getCodeBaseFolders

        public java.util.List<java.lang.String> getCodeBaseFolders()
        Returns:
        the list of folders to be added to the codebase
      • getResourcesDescs

        public ResourcesDesc[] getResourcesDescs​(java.util.Locale locale,
                                                 java.lang.String os,
                                                 java.lang.String arch)
        Overrides:
        getResourcesDescs in class JNLPFile
        Parameters:
        locale - preferred locale of resource
        os - preferred os of resource
        arch - preferred arch of resource
        Returns:
        the resources section of the JNLP file for the specified locale, os, and arch.
      • isApplet

        public boolean isApplet()
        Overrides:
        isApplet in class JNLPFile
        Returns:
        whether the lauch descriptor describes an Applet.
      • isApplication

        public boolean isApplication()
        Overrides:
        isApplication in class JNLPFile
        Returns:
        whether the lauch descriptor describes an Application.
      • isComponent

        public boolean isComponent()
        Overrides:
        isComponent in class JNLPFile
        Returns:
        whether the lauch descriptor describes a Component.
      • isInstaller

        public boolean isInstaller()
        Overrides:
        isInstaller in class JNLPFile
        Returns:
        whether the lauch descriptor describes an Installer.
      • getDebugJnlp

        public java.lang.String getDebugJnlp()
      • haveDebugJnlp

        public boolean haveDebugJnlp()
      • toJnlp

        public java.lang.String toJnlp​(boolean needSecurity,
                                       boolean useHref,
                                       boolean fix)
      • strippClass

        public static java.lang.String strippClass​(java.lang.String s)