01: /*
02: * Created on May 30, 2004
03: *
04: * This file is part of Thingamablog. ( http://thingamablog.sf.net )
05: *
06: * Copyright (c) 2004, Bob Tantlinger All Rights Reserved.
07: *
08: * This program is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU General Public License
10: * as published by the Free Software Foundation; either version 2
11: * of the License, or (at your option) any later version.
12: *
13: * This program is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16: * GNU General Public License for more details.
17: *
18: * You should have received a copy of the GNU General Public License
19: * along with this program; if not, write to the Free Software
20: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21: * USA.
22: */
23: package net.sf.thingamablog.blog;
24:
25: /**
26: *
27: * Abstract definition of a PingService. Subclasses will typically define
28: * an Xml-RPC based ping service
29: *
30: * @author Bob Tantlinger
31: */
32: public abstract class PingService {
33: private boolean isEnabled = true;
34: private String name;
35: private String url;
36:
37: /**
38: * Gets the name of the procedure to invoke
39: * @return the proc name
40: */
41: public abstract String getProcedureName();
42:
43: /**
44: * Get the parameters that the procedure requires
45: * @param blog
46: * @return
47: */
48: public abstract String[] getParameters(Weblog blog);
49:
50: /**
51: * Sets the service name
52: * @param s
53: */
54: public void setServiceName(String s) {
55: name = s;
56: }
57:
58: /**
59: * Gets the service name
60: * @return
61: */
62: public String getServiceName() {
63: return name;
64: }
65:
66: /**
67: * Sets the URL of the service
68: * @param s
69: */
70: public void setServiceUrl(String s) {
71: url = s;
72: }
73:
74: /**
75: * Gets the URL of the service
76: * @return
77: */
78: public String getServiceUrl() {
79: return url;
80: }
81:
82: /**
83: * Enable or disable the service from being pinged
84: * @param b
85: */
86: public void setEnabled(boolean b) {
87: isEnabled = b;
88: }
89:
90: /**
91: * Indicates whether this service should be pinged
92: * @return
93: */
94: public boolean isEnabled() {
95: return isEnabled;
96: }
97: }
|