jnlp.sample.servlet
Class JnlpResource

java.lang.Object
  extended by jnlp.sample.servlet.JnlpResource

public class JnlpResource
extends Object

A JnlpResource encapsulate the information about a resource that is needed to process a JNLP Download Request. The pattern matching arguments are: name, version-id, os, arch, and locale. The outgoing arguments are: - path to resource in (WAR File) - product version-id (Version-id to return or null. Typically same as version-id above) - mime-type for content - lastModified date of WAR file resource


Constructor Summary
JnlpResource(ServletContext context, String path)
           
JnlpResource(ServletContext context, String name, String versionId, String[] osList, String[] archList, String[] localeList, String path, String returnVersionId)
           
JnlpResource(ServletContext context, String name, String versionId, String[] osList, String[] archList, String[] localeList, String path, String returnVersionId, String encoding)
           
 
Method Summary
 boolean exists()
           
 String[] getArchList()
           
 long getLastModified()
           
 String[] getLocaleList()
           
 String getMimeType()
           
 String getName()
           
 String[] getOSList()
           
 String getPath()
           
 URL getResource()
           
 String getReturnVersionId()
           
 String getVersionId()
           
 boolean isJarFile()
           
 boolean isJnlpFile()
           
static void setDefaultExtensions(String jnlpExtension, String jarExtension)
           
 String toString()
          Print info about an entry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JnlpResource

public JnlpResource(ServletContext context,
                    String path)

JnlpResource

public JnlpResource(ServletContext context,
                    String name,
                    String versionId,
                    String[] osList,
                    String[] archList,
                    String[] localeList,
                    String path,
                    String returnVersionId)

JnlpResource

public JnlpResource(ServletContext context,
                    String name,
                    String versionId,
                    String[] osList,
                    String[] archList,
                    String[] localeList,
                    String path,
                    String returnVersionId,
                    String encoding)
Method Detail

setDefaultExtensions

public static void setDefaultExtensions(String jnlpExtension,
                                        String jarExtension)

getPath

public String getPath()

getResource

public URL getResource()

getMimeType

public String getMimeType()

getLastModified

public long getLastModified()

exists

public boolean exists()

isJnlpFile

public boolean isJnlpFile()

isJarFile

public boolean isJarFile()

getName

public String getName()

getVersionId

public String getVersionId()

getOSList

public String[] getOSList()

getArchList

public String[] getArchList()

getLocaleList

public String[] getLocaleList()

getReturnVersionId

public String getReturnVersionId()

toString

public String toString()
Print info about an entry

Overrides:
toString in class Object


Copyright © 2005-2011 Sun Microsystems. All Rights Reserved.