01: /**
02: * Copyright (C) 2001-2004 France Telecom R&D
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */package org.objectweb.speedo.pm.api;
18:
19: import org.objectweb.speedo.lib.Personality;
20: import org.objectweb.speedo.query.api.QueryManager;
21: import org.objectweb.speedo.sequence.api.SequenceManager;
22:
23: import java.util.Properties;
24:
25: /**
26: * It manages POManagerItf instances.
27: *
28: * @author S.Chassande-Barrioz
29: */
30: public interface POManagerFactoryItf {
31:
32: /**
33: * Finds in the associated POManagerSwitchItf a POManagerItf managed by the
34: * POManagerFactoryItf.
35: * @return a POManagerItf instance or a null value.
36: */
37: POManagerItf lookup();
38:
39: /**
40: * It call pms.unbind(this) in order to unbind a POManagerItf managed by
41: * this POManagerFactoryItf, from the thread.
42: */
43: void unbindPM();
44:
45: /**
46: * Ask to the PMS to bind a particular PM to the Thread.
47: * @param pm
48: */
49: void bindPM2Thread(POManagerItf pm);
50:
51: /**
52: * Indicates when a PM has been closed.
53: * @param pr the closed PM.
54: */
55: void poManagerClosed(POManagerItf pr);
56:
57: /**
58: * Get the sequence manager associated to the pmf.
59: */
60: SequenceManager getSequenceManager();
61:
62: /**
63: * Set the sequence manager.
64: */
65: void setSequenceManager(SequenceManager sequenceManager);
66:
67: /**
68: * Get the query manager.
69: */
70: QueryManager getQueryManager();
71:
72: /**
73: * Set the query manager
74: */
75: void setQueryManager(QueryManager queryManager);
76:
77: POManagerItf getPOManager();
78:
79: /**
80: * Clean the POManagerFactory:
81: * - it enables to forget all persistent classes previously loaded.
82: */
83: void clean();
84:
85: Personality getPersonality();
86:
87: Properties getProperties();
88: }
|