public class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSResource> extends GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE>
GCUBEFilePersistenceDelegate to GCUBEWSResources.| Modifier and Type | Field and Description |
|---|---|
protected GCUBEStatefulPortTypeContext |
ctxt |
protected static String |
WSRESOURCE_FILE_SUFFIX
The suffix of file serialisation of resource.
|
logger| Constructor and Description |
|---|
GCUBEWSFilePersistenceDelegate() |
| Modifier and Type | Method and Description |
|---|---|
protected File |
getFileFromResource(RESOURCE resource)
Returns the file serialisation of a resource.
|
protected GCUBEWSResourceKey |
getIDFromFileName(String s)
Returns a resource identifier from a string.
|
protected String |
getSuffix()
Returns the suffix for resource file serialisations.
|
void |
initialise(GCUBEResourceHome<? super GCUBEWSResourceKey,GCUBEWSResourceKey,RESOURCE> home)
Initialises the delegate from the
GCUBEResourceHome of the associated resources. |
protected void |
onLoad(RESOURCE resource,
ObjectInputStream stream)
Deserialises the state of resource from a
ObjectInputStream. |
protected void |
onStore(RESOURCE resource,
ObjectOutputStream stream)
Serialises the state of a resource into a
ObjectOutputStream. |
getResourceIdentifiers, getStorageRoot, onLoad, onRemove, onStoreload, remove, storeprotected static final String WSRESOURCE_FILE_SUFFIX
protected volatile GCUBEStatefulPortTypeContext ctxt
public void initialise(GCUBEResourceHome<? super GCUBEWSResourceKey,GCUBEWSResourceKey,RESOURCE> home) throws Exception
GCUBEResourceHome of the associated resources.initialise in class GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE extends GCUBEWSResource>home - the home.Exception - if the delegate could not be initialised.protected void onLoad(RESOURCE resource, ObjectInputStream stream) throws Exception
ObjectInputStream.
Extends in accordance with resource semantics.onLoad in class GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE extends GCUBEWSResource>stream - the stream.Exception - if the stream could not be processed.protected void onStore(RESOURCE resource, ObjectOutputStream stream) throws Exception
ObjectOutputStream.
Extend in accordance with resource semantics.onStore in class GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE extends GCUBEWSResource>stream - the stream.Exception - if the stream could not be processed.protected String getSuffix()
getSuffix in class GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE extends GCUBEWSResource>protected File getFileFromResource(RESOURCE resource)
getFileFromResource in class GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE extends GCUBEWSResource>protected GCUBEWSResourceKey getIDFromFileName(String s)
getIDFromFileName in class GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE extends GCUBEWSResource>s - the string.Copyright © 2015. All Rights Reserved.