public abstract class SessionKeyExternalizer<K extends Key<String>> extends Object implements Externalizer<K>
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
SessionKeyExternalizer.KeyFactory<K extends Key<String>> |
| Modifier | Constructor and Description |
|---|---|
protected |
SessionKeyExternalizer(Class<K> targetClass,
Function<String,K> factory) |
protected |
SessionKeyExternalizer(Class<K> targetClass,
SessionKeyExternalizer.KeyFactory<K> factory) |
| Modifier and Type | Method and Description |
|---|---|
Class<? extends K> |
getTargetClass()
Returns the target class of the object to externalize.
|
K |
readObject(ObjectInput input)
Read an instance from the stream.
|
void |
writeObject(ObjectOutput output,
K key)
Writes the object reference to the stream.
|
protected SessionKeyExternalizer(Class<K> targetClass, Function<String,K> factory)
protected SessionKeyExternalizer(Class<K> targetClass, SessionKeyExternalizer.KeyFactory<K> factory)
public void writeObject(ObjectOutput output, K key) throws IOException
ExternalizerwriteObject in interface Externalizer<K extends Key<String>>output - the object output to write tokey - the object reference to writeIOException - if an I/O error occurspublic K readObject(ObjectInput input) throws IOException, ClassNotFoundException
ExternalizerExternalizer.writeObject(ObjectOutput, Object) method. Implementations are free
to create instances of the object read from the stream in any way that they
feel like. This could be via constructor, factory or reflection.readObject in interface Externalizer<K extends Key<String>>input - the object input from which to readIOException - if an I/O error occursClassNotFoundException - if a class could not be foundpublic Class<? extends K> getTargetClass()
ExternalizergetTargetClass in interface Externalizer<K extends Key<String>>Copyright © 2021 JBoss by Red Hat. All rights reserved.