01: /**
02: * Sequoia: Database clustering technology.
03: * Copyright (C) 2006 Continuent, Inc.
04: * Contact: sequoia@continuent.org
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: *
18: * Initial developer(s): Emmanuel Cecchet.
19: * Contributor(s): ______________________.
20: */package org.continuent.sequoia.controller.backup.backupers;
21:
22: /**
23: * This denotes a class used to parse JDBC URLs. The parsing extracts key
24: * elements of the URL including the subprotocol, database, host, and port.
25: * Implementation should supply reasonable default values. If no value can
26: * be assigned to a property, a null should be assigned instead.
27: *
28: * @author <a href="mailto:robert.hodges@continuent.com">Robert Hodges</a>
29: * @version 1.0
30: */
31: public interface JdbcUrlParser {
32: /**
33: * Loads a URL to be parsed. Setting this loads all getter values.
34: *
35: * @param url JDBC URL that we would like to parse
36: */
37: public abstract void setUrl(String url);
38:
39: /**
40: * Returns the database name.
41: *
42: * @return Returns the dbName.
43: */
44: public abstract String getDbName();
45:
46: /**
47: * Returns the database type (actually the JDBC subprotocol).
48: *
49: * @return Returns the dbType.
50: */
51: public abstract String getDbType();
52:
53: /**
54: * Returns the host name.
55: *
56: * @return Returns the host.
57: */
58: public abstract String getHost();
59:
60: /**
61: * Returns the network port.
62: *
63: * @return Returns the port.
64: */
65: public abstract String getPort();
66: }
|