|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.remoting.marshal.serializable.SerializableUnMarshaller
org.jboss.remoting.marshal.encryption.EncryptingUnMarshaller
public class EncryptingUnMarshaller
EncryptingMarshaller
and EncryptingUnMarshaller
are a general
purpose encrypting marshaller / decompressing unmarshaller pair based on
Java's crypto stream facilities.
EncryptingUnMarshaller
is subclassed from SerializableUnMarshaller
,
and by default it uses super.read()
to deserialize an object, once the object has been
decrypted. Optionally, it can wrap any other unmarshaller and use that instead of
SerializableUnMarshaller
to unmarshall an encrypted input stream. For example,
new EncryptingUnMarshaller(new HTTPUnMarshaller())
HTTPUnMarshaller
to restore an unencrypted input stream.
Field Summary | |
---|---|
static java.lang.String |
DATATYPE
|
Fields inherited from class org.jboss.remoting.marshal.serializable.SerializableUnMarshaller |
---|
customClassLoader, serializationType |
Constructor Summary | |
---|---|
EncryptingUnMarshaller()
Create a new EncryptingUnMarshaller. |
|
EncryptingUnMarshaller(UnMarshaller unMarshaller)
Create a new EncryptingUnMarshaller. |
Method Summary | |
---|---|
UnMarshaller |
cloneUnMarshaller()
Returns a new EncryptingUnMarshaller |
java.lang.Object |
read(java.io.InputStream inputStream,
java.util.Map metadata,
int version)
Restores a encrypted, marshalled form of an object to its original state. |
void |
setCipherAlgorithm(java.lang.String algo)
Set the Cipher Algorithm to use |
Methods inherited from class org.jboss.remoting.marshal.serializable.SerializableUnMarshaller |
---|
getMarshallingStream, getMarshallingStream, getSerializationType, read, setClassLoader, setSerializationType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DATATYPE
Constructor Detail |
---|
public EncryptingUnMarshaller()
public EncryptingUnMarshaller(UnMarshaller unMarshaller)
unMarshaller
- unmarshaller to be used to restore
unencrypted byte stream to original objectMethod Detail |
---|
public void setCipherAlgorithm(java.lang.String algo)
algo
- EncryptionManager.DEFAULT_CIPHER_ALGORITHM
public java.lang.Object read(java.io.InputStream inputStream, java.util.Map metadata, int version) throws java.io.IOException, java.lang.ClassNotFoundException
read
in interface VersionedUnMarshaller
read
in class SerializableUnMarshaller
inputStream
- InputStream
from which marshalled form is to be retrievedmetadata
- can be any transport specific metadata (such as headers from http transport).
This can be null, depending on if transport supports metadata.version
- wire format version
java.io.IOException
- if there is a problem reading from inputStream
java.lang.ClassNotFoundException
- if there is a problem finding a class needed for unmarshallingpublic UnMarshaller cloneUnMarshaller() throws java.lang.CloneNotSupportedException
EncryptingUnMarshaller
cloneUnMarshaller
in interface UnMarshaller
cloneUnMarshaller
in class SerializableUnMarshaller
EncryptingUnMarshaller
java.lang.CloneNotSupportedException
- In practice no exceptions are thrown.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |