com.planet_ink.coffee_mud.core.intermud.i3
Class IMudPeer

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.intermud.i3.IMudPeer
All Implemented Interfaces:
PersistentPeer

public class IMudPeer
extends java.lang.Object
implements PersistentPeer

Copyright (c) 1996 George Reese Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Constructor Summary
IMudPeer()
           
 
Method Summary
 boolean isRestoring()
          An implementation uses this to tell its Persistent that it is in the middle of restoring.
 void restore()
          Gets data about this peer from storage and gives it back to the object for which this peer exists.
 void save()
          Triggers a save of its peer.
 void setPersistent(Persistent ob)
          Assigns a persistent object to this peer for persistence operations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IMudPeer

public IMudPeer()
Method Detail

restore

public void restore()
             throws PersistenceException
Gets data about this peer from storage and gives it back to the object for which this peer exists.

Specified by:
restore in interface PersistentPeer
Throws:
PersistenceException - if an error occurs during restore

save

public void save()
          throws PersistenceException
Triggers a save of its peer. Implementing classes should do whatever it takes to save the object in this method.

Specified by:
save in interface PersistentPeer
Throws:
PersistenceException - if a problem occurs in saving

setPersistent

public void setPersistent(Persistent ob)
Assigns a persistent object to this peer for persistence operations.

Specified by:
setPersistent in interface PersistentPeer
Parameters:
ob - the implementation of com.planet_ink.coffee_mud.core.intermud.i3.persist.Persistent that this is a peer for
See Also:
Persistent

isRestoring

public boolean isRestoring()
An implementation uses this to tell its Persistent that it is in the middle of restoring.

Specified by:
isRestoring in interface PersistentPeer
Returns:
true if a restore operation is in progress