Class ArchiveType
java.lang.Object
org.glassfish.api.deployment.archive.ArchiveType
- Direct Known Subclasses:
CarArchiveType
,EarArchiveType
,EjbArchiveType
,RarArchiveType
,ScatteredWarArchiveType
,WarArchiveType
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 Jakarta 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
Jakarta EE platform spec. ArchiveType maps to the way containers are defined in the Jakarta EE platform spec.
- Author:
- Sanjeeb Sahoo
-
Constructor Summary
ModifierConstructorDescriptionprotected
ArchiveType
(String value) Same as callingArchiveType(String, String)
with an empty string as extension.protected
ArchiveType
(String value, String extension) -
Method Summary
-
Constructor Details
-
ArchiveType
- Parameters:
value
- value of this archive type as reported. Used for comparison and astoString()
extension
- file extension for this type of archive
-
ArchiveType
Same as callingArchiveType(String, String)
with an empty string as extension.
-
-
Method Details
-
getExtension
- Returns:
- the file extension string for this module type.
-
toString
-
hashCode
public int hashCode() -
equals
- Overrides:
equals
in classObject
- Returns:
- two types are equal just if they have the same value (
toString()
)
-