Class AutoSignedContent
- java.lang.Object
-
- org.glassfish.appclient.server.core.jws.servedcontent.Content.Adapter
-
- org.glassfish.appclient.server.core.jws.servedcontent.FixedContent
-
- org.glassfish.appclient.server.core.jws.servedcontent.AutoSignedContent
-
- All Implemented Interfaces:
Content
,StaticContent
- Direct Known Subclasses:
StreamedAutoSignedStaticContent
public class AutoSignedContent extends FixedContent
Represents otherwise fixed content that must be automatically signed if it does not yet exist or if the underlying unsigned file has changed since the signed version was created.- Author:
- tjquinn
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.appclient.server.core.jws.servedcontent.Content
Content.Adapter, Content.State
-
-
Constructor Summary
Constructors Constructor Description AutoSignedContent(File unsignedFile, File signedFile, String userProvidedAlias, ASJarSigner jarSigner, String relativeURI, String appName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
File
file()
Returns a File object for where the signed file will be once it is created.int
hashCode()
boolean
isAvailable(URI requestURI)
Reports whether the signed content is available.String
toString()
-
Methods inherited from class org.glassfish.appclient.server.core.jws.servedcontent.FixedContent
process
-
Methods inherited from class org.glassfish.appclient.server.core.jws.servedcontent.Content.Adapter
resume, start, state, stop, suspend
-
-
-
-
Constructor Detail
-
AutoSignedContent
public AutoSignedContent(File unsignedFile, File signedFile, String userProvidedAlias, ASJarSigner jarSigner, String relativeURI, String appName) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
file
public File file() throws IOException
Returns a File object for where the signed file will be once it is created. Note that any use of the File returned by this method MUST be preceded by an invocation of isAvailable.- Specified by:
file
in interfaceStaticContent
- Overrides:
file
in classFixedContent
- Returns:
- File for where the signed copy of the file will reside
- Throws:
IOException
-
isAvailable
public boolean isAvailable(URI requestURI) throws IOException
Reports whether the signed content is available. As a side-effect, this method will create the signed file if it does not exist or is obsolete.- Specified by:
isAvailable
in interfaceContent
- Overrides:
isAvailable
in classContent.Adapter
- Returns:
- Throws:
IOException
-
toString
public String toString()
- Overrides:
toString
in classFixedContent
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classFixedContent
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classFixedContent
-
-