org.glassfish.embed
Class ScatteredWar

java.lang.Object
  extended by org.glassfish.embed.ScatteredWar
All Implemented Interfaces:
org.glassfish.api.deployment.archive.Archive, org.glassfish.api.deployment.archive.ReadableArchive

public class ScatteredWar
extends java.lang.Object
implements org.glassfish.api.deployment.archive.ReadableArchive

ReadableArchive representation of an web application that is not assembled into the canonical war format.

Author:
Kohsuke Kawaguchi

Field Summary
 java.util.Collection<java.net.URL> classes
          Classes and jar files that constitute the web app.
 java.lang.String name
          Name of the web app.
 java.io.File resources
          Static resources, JSP, etc.
 java.io.File webXml
          Location of web.xml
 
Constructor Summary
ScatteredWar(java.lang.String name, java.io.File resources, java.io.File webXml, java.util.Collection<java.net.URL> classes)
           
 
Method Summary
 void close()
           
 boolean delete()
           
 java.util.Enumeration<java.lang.String> entries()
           
 java.util.Enumeration entries(java.lang.String prefix)
           
 boolean exists()
           
 boolean exists(java.lang.String name)
           
 long getArchiveSize()
           
 java.io.InputStream getEntry(java.lang.String name)
           
 long getEntrySize(java.lang.String name)
           
 java.util.jar.Manifest getManifest()
           
 java.lang.String getName()
           
 org.glassfish.api.deployment.archive.ReadableArchive getSubArchive(java.lang.String name)
           
 java.net.URI getURI()
           
 void open(java.net.URI uri)
           
 boolean renameTo(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resources

public final java.io.File resources
Static resources, JSP, etc.


webXml

public final java.io.File webXml
Location of web.xml


classes

public final java.util.Collection<java.net.URL> classes
Classes and jar files that constitute the web app.


name

public final java.lang.String name
Name of the web app.

Constructor Detail

ScatteredWar

public ScatteredWar(java.lang.String name,
                    java.io.File resources,
                    java.io.File webXml,
                    java.util.Collection<java.net.URL> classes)
Parameters:
webXml - if null, defaults to WEB-INF/web.xml under resources.
Method Detail

getEntry

public java.io.InputStream getEntry(java.lang.String name)
                             throws java.io.IOException
Specified by:
getEntry in interface org.glassfish.api.deployment.archive.ReadableArchive
Throws:
java.io.IOException

exists

public boolean exists(java.lang.String name)
               throws java.io.IOException
Specified by:
exists in interface org.glassfish.api.deployment.archive.ReadableArchive
Throws:
java.io.IOException

getEntrySize

public long getEntrySize(java.lang.String name)
Specified by:
getEntrySize in interface org.glassfish.api.deployment.archive.ReadableArchive

open

public void open(java.net.URI uri)
          throws java.io.IOException
Specified by:
open in interface org.glassfish.api.deployment.archive.ReadableArchive
Throws:
java.io.IOException

getSubArchive

public org.glassfish.api.deployment.archive.ReadableArchive getSubArchive(java.lang.String name)
                                                                   throws java.io.IOException
Specified by:
getSubArchive in interface org.glassfish.api.deployment.archive.ReadableArchive
Throws:
java.io.IOException

exists

public boolean exists()
Specified by:
exists in interface org.glassfish.api.deployment.archive.ReadableArchive

delete

public boolean delete()
Specified by:
delete in interface org.glassfish.api.deployment.archive.ReadableArchive

renameTo

public boolean renameTo(java.lang.String name)
Specified by:
renameTo in interface org.glassfish.api.deployment.archive.ReadableArchive

close

public void close()
           throws java.io.IOException
Specified by:
close in interface org.glassfish.api.deployment.archive.Archive
Throws:
java.io.IOException

entries

public java.util.Enumeration<java.lang.String> entries()
Specified by:
entries in interface org.glassfish.api.deployment.archive.Archive

entries

public java.util.Enumeration entries(java.lang.String prefix)
Specified by:
entries in interface org.glassfish.api.deployment.archive.Archive

getManifest

public java.util.jar.Manifest getManifest()
                                   throws java.io.IOException
Specified by:
getManifest in interface org.glassfish.api.deployment.archive.Archive
Throws:
java.io.IOException

getURI

public java.net.URI getURI()
Specified by:
getURI in interface org.glassfish.api.deployment.archive.Archive

getArchiveSize

public long getArchiveSize()
                    throws java.lang.SecurityException
Specified by:
getArchiveSize in interface org.glassfish.api.deployment.archive.Archive
Throws:
java.lang.SecurityException

getName

public java.lang.String getName()
Specified by:
getName in interface org.glassfish.api.deployment.archive.Archive


Copyright © 2008 Sun Microsystems, Inc.. All Rights Reserved.