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 booleanequals(Object obj)Filefile()Returns a File object for where the signed file will be once it is created.inthashCode()booleanisAvailable(URI requestURI)Reports whether the signed content is available.StringtoString()-
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:
filein interfaceStaticContent- Overrides:
filein 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:
isAvailablein interfaceContent- Overrides:
isAvailablein classContent.Adapter- Returns:
- Throws:
IOException
-
toString
public String toString()
- Overrides:
toStringin classFixedContent
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classFixedContent
-
hashCode
public int hashCode()
- Overrides:
hashCodein classFixedContent
-
-