KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > server > StateReceiver


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.server;
13
14 import com.versant.core.common.OID;
15 import com.versant.core.common.State;
16 import com.versant.core.metadata.FetchGroup;
17 import com.versant.core.common.OID;
18
19 /**
20  * Classes that can receive extra states from a DataStore implement this.
21  */

22 public interface StateReceiver {
23
24     /**
25      * This is a callback for DataStore instances to use when they have
26      * additional data above that requested.
27      *
28      * @param fetchGroup This is relative to the class of oid
29      * @return True if the receiver may accept a State for the oid. The store
30      * should construct a State and call addState. If this is false then
31      * the store should discard its extra data. This two step process prevents
32      * the construction of unecessary State objects.
33      * @see #addState
34      */

35     public boolean isStateRequired(OID oid, FetchGroup fetchGroup);
36
37     /**
38      * This is a callback for DataStore instances to use when they have
39      * additional data they want to provide.
40      *
41      * @see #isStateRequired
42      */

43     public void addState(OID oid, State state);
44 }
45
Popular Tags