Class ZipSerializableViewImpl
- java.lang.Object
-
- org.jboss.shrinkwrap.impl.base.serialization.ZipSerializableViewImpl
-
- All Implemented Interfaces:
java.io.Serializable
,Assignable
,SerializableView
,ZipSerializableView
public class ZipSerializableViewImpl extends java.lang.Object implements ZipSerializableView
Implementation of aSerializable
view ofArchive
s, backed by ZIP en/decoding the contents during serialization/deserialization. Defines the wire protocol and must remain backwards-compatible.- Version:
- $Revision: $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Archive<?>
archive
Underlying archive.private java.lang.String
id
String form of the IDprivate static java.util.logging.Logger
log
Loggerprivate java.lang.String
name
Name of the archive; to be serializedprivate static long
serialVersionUID
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ZipSerializableViewImpl(Archive<?> archive)
Creates a new instance, wrapping the specifiedArchive
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <TYPE extends Assignable>
TYPEas(java.lang.Class<TYPE> clazz)
Wraps an Archive in a different 'view'.private void
readObject(java.io.ObjectInputStream in)
Deserializes according to the custom form defined byZipSerializableImpl#writeObject(ObjectOutputStream)
private void
writeObject(java.io.ObjectOutputStream out)
Serializes the invocation with a custom form
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
serialVersionUID- See Also:
- Constant Field Values
-
log
private static final java.util.logging.Logger log
Logger
-
name
private final java.lang.String name
Name of the archive; to be serialized
-
id
private transient java.lang.String id
String form of the ID
-
archive
private transient Archive<?> archive
Underlying archive. Won't be directly serialized; instead we'll encode it as ZIP and send that
-
-
Method Detail
-
as
public <TYPE extends Assignable> TYPE as(java.lang.Class<TYPE> clazz)
Wraps an Archive in a different 'view'.- Specified by:
as
in interfaceAssignable
- Parameters:
clazz
- Extension interface to load- Returns:
- The Archive wrapped as TYPE
- See Also:
Assignable.as(java.lang.Class)
-
writeObject
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
Serializes the invocation with a custom form- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
Deserializes according to the custom form defined byZipSerializableImpl#writeObject(ObjectOutputStream)
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-