Class JWSAdapterManager

  • All Implemented Interfaces:
    org.glassfish.hk2.api.PostConstruct

    @Service
    @Singleton
    public class JWSAdapterManager
    extends Object
    implements org.glassfish.hk2.api.PostConstruct
    Handles all management of the HTTP adapters created to support Java Web Start launches of app clients.
    Author:
    tjquinn
    • Constructor Detail

      • JWSAdapterManager

        public JWSAdapterManager()
    • Method Detail

      • postConstruct

        public void postConstruct()
        Specified by:
        postConstruct in interface org.glassfish.hk2.api.PostConstruct
      • addContentForAppClient

        public void addContentForAppClient​(String appName,
                                           String clientURIWithinEAR,
                                           AppClientServerApplication contributor,
                                           Properties tokens,
                                           Map<String,​StaticContent> staticContent,
                                           Map<String,​DynamicContent> dynamicContent)
                                    throws EndpointRegistrationException,
                                           IOException
        Adds content on behalf of a single app client to the HTTP adapters for the client and/or the containing EAR.

        This method always creates at least one adapter for the client - one to receive requests for the user-friendly context path. (This is the path either assigned by the developer or defaulted by the server based on the application name and, for clients nested within an EAR, the URI to the app client within the EAR.) This adapter will only serve the main generated JNLP document. All other accesses to files that can be downloaded will use the "user-unfriendly" context path.

        For stand-alone app clients it also creates an adapter for the "user-unfriendly" context path. This serves all content other than the main JNLP document.

        For nested app clients this method will either create or reuse an adapter which serves content for the EAR. This includes content specific to the app client being added as well as for library JARs, etc. that could be common to more than one app client.

        Parameters:
        appName -
        contributor -
        tokens -
        staticContent -
        dynamicContent -
        Throws:
        EndpointRegistrationException
        IOException
      • contextRootForAppAdapter

        public String contextRootForAppAdapter​(String appName)