Class ArchiveType
- java.lang.Object
-
- org.glassfish.api.deployment.archive.ArchiveType
-
@Contract @Singleton public abstract class ArchiveType extends Object
ArchiveType is an extension over ModuleType defined in jsr88 API. It is analogous to type of an archive or a module or deployment unit, whichever way you prefer to call them. Adding a new archive type (or ArchiveType) is a very expensive operation. For example, there has been no new archive types introduced in Java EE since RAR type. Adding a new archive type involves writing an ArchiveHandler which involves writing logic to create class loaders. Now, that's not same as adding adding a technology type like jersey or jpa. This is only a contract. Actual types are made available as services by appropriate containers. GlassFish deployment framework uses the word container to refer to services. Containers are actually defined in Java EE platform spec. ArchiveType maps to the way containers are defined in the Java EE platform spec.- Author:
- Sanjeeb Sahoo
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ArchiveType(String value)
Same as calling #ArchiveType(String, String) with an empty string as extension.protected
ArchiveType(String value, String extension)
Ensure a correct value is passed as that's what is returned bytoString()
which is sometimes used during comparison as some old APIs likeArchiveHandler.getArchiveType()
use String.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getExtension()
Return the file extension string for this module type.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
ArchiveType
protected ArchiveType(String value, String extension)
Ensure a correct value is passed as that's what is returned bytoString()
which is sometimes used during comparison as some old APIs likeArchiveHandler.getArchiveType()
use String.- Parameters:
value
- value of this archive type as reported intoString()
extension
- file extension for this type of archive
-
ArchiveType
protected ArchiveType(String value)
Same as calling #ArchiveType(String, String) with an empty string as extension.
-
-