|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.snmp4j.agent.io.DefaultMOPersistenceProvider
public class DefaultMOPersistenceProvider
The DefaultMOPersistenceProvider provides agent state
persistence using a file with DefaultMOInput and
DefaultMOOutput input/output.
| Constructor Summary | |
|---|---|
DefaultMOPersistenceProvider(MOServer[] server,
java.lang.String defaultURI)
Creates a persistence provider for the supplied MOServer instances. |
|
| Method Summary | |
|---|---|
java.lang.String |
getDefaultURI()
Gets the URI of the default persistent storage for this provider. |
java.lang.String |
getPersistenceProviderID()
Returns an unique ID of the persistence provider which should identify the format and type of the persistence provider. |
boolean |
isValidPersistenceURI(java.lang.String uri)
Checks whether the supplied URI string is valid for this persistence provider. |
void |
restore(java.lang.String uri,
int importMode)
Restore (load) agent state from the specified file URI or file name. |
void |
store(java.lang.String uri)
Stores the current agent state to persistent storage specified by the supplied URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultMOPersistenceProvider(MOServer[] server,
java.lang.String defaultURI)
MOServer instances.
The content and state of the managed objects of those servers are subject
to store(java.lang.String) and restore(java.lang.String, int) operations.
server - an array of MOServer instances (possibly empty).defaultURI - the (optional) default URI (i.e., file path) to be used for this
persistence provider.| Method Detail |
|---|
public java.lang.String getPersistenceProviderID()
getPersistenceProviderID in interface MOPersistenceProviderpublic boolean isValidPersistenceURI(java.lang.String uri)
isValidPersistenceURI in interface MOPersistenceProvideruri - a string identifying a persistent storage location for this
storage provider.
true if the uri is valid,
false otherwise.
public void restore(java.lang.String uri,
int importMode)
throws java.io.IOException
restore in interface MOPersistenceProvideruri - a string pointing to the persistent storage file from which the
agent state should be restored from. The format of he string is
either a simple file name or an URI starting with "file:".importMode - specifies how the agent's current state should be
update while restoring a previous state.
java.io.IOException - if the restore operation fails.
public void store(java.lang.String uri)
throws java.io.IOException
store in interface MOPersistenceProvideruri - a string pointing to the persistent storage file to use.
The format of he string is either a simple file name or an URI
starting with "file:".
java.io.IOException - if the store operation fails.public java.lang.String getDefaultURI()
MOPersistenceProvider
getDefaultURI in interface MOPersistenceProvidernull
value indicates that there is no default location.
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||