public abstract class JNDIStorable extends Object implements Referenceable, Externalizable
Constructor and Description |
---|
JNDIStorable() |
Modifier and Type | Method and Description |
---|---|
protected abstract Map<String,String> |
buildFromProperties(Map<String,String> props)
Set the properties that will represent the instance in JNDI
|
Map<String,String> |
getProperties()
Get the properties from this instance for storing in JNDI
|
protected String |
getProperty(Map<String,String> map,
String key,
String defaultValue) |
Reference |
getReference()
Retrieve a Reference for this instance to store in JNDI
|
protected abstract void |
populateProperties(Map<String,String> props)
Initialize the instance from properties stored in JNDI
|
void |
readExternal(ObjectInput in) |
Map<String,String> |
setProperties(Map<String,String> props)
set the properties for this instance as retrieved from JNDI
|
void |
writeExternal(ObjectOutput out) |
protected abstract Map<String,String> buildFromProperties(Map<String,String> props)
props
- The properties to use when building the new isntance.protected abstract void populateProperties(Map<String,String> props)
props
- The properties to use when initializing the new instance.public Map<String,String> setProperties(Map<String,String> props)
props
- The properties to apply to this instance.public Map<String,String> getProperties()
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
- if error on building Referencepublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Externalizable.readExternal(java.io.ObjectInput)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
Externalizable.writeExternal(java.io.ObjectOutput)
Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.