KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > tunnels > TunnelDatabase


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.tunnels;
21
22 import java.util.List JavaDoc;
23
24 import com.sslexplorer.boot.HostService;
25 import com.sslexplorer.extensions.types.PluginDatabase;
26
27 /**
28  * The <i>System Configuration> {@link com.sslexplorer.extensions.types.PluginDatabase}
29  * implementation is responsible for storing an retrieving SSL-Explorer's tunnel
30  * resource and configuration.
31  *
32  * @author James D Robinson <a HREF="mailto:james@3sp.com">&lt;james@3sp.com&gt;</a>
33  *
34  */

35 public interface TunnelDatabase extends PluginDatabase {
36     
37
38     /**
39      * Method to create a tunnel.
40      *
41      * @param name
42      * @param description
43      * @param type
44      * @param autoStart
45      * @param transport
46      * @param username
47      * @param sourcePort
48      * @param destination
49      * @param sourceInterface
50      * @return Tunnel
51      * @throws Exception
52      */

53     public Tunnel createTunnel(int realmID, String JavaDoc name, String JavaDoc description, int type, boolean autoStart, String JavaDoc transport, String JavaDoc username,
54                     int sourcePort, HostService destination, String JavaDoc sourceInterface) throws Exception JavaDoc;
55
56     /**
57      * Method to update the tunnel.
58      *
59      * @param id
60      * @param name
61      * @param description
62      * @param type
63      * @param autoStart
64      * @param transport
65      * @param username
66      * @param sourcePort
67      * @param destination
68      * @param sourceInterface
69      * @throws Exception
70      */

71     public void updateTunnel(int id, String JavaDoc name, String JavaDoc description, int type, boolean autoStart, String JavaDoc transport,
72                     String JavaDoc username, int sourcePort, HostService destination, String JavaDoc sourceInterface) throws Exception JavaDoc;
73
74     /**
75      * Get the tunnels
76      *
77      * @return List<Tunnel> all tunnels
78      * @throws Exception
79      */

80     public List JavaDoc<Tunnel> getTunnels() throws Exception JavaDoc;
81
82     /**
83      * Get the tunnels
84      *
85      * @return List<Tunnel> all tunnels
86      * @throws Exception
87      */

88     public List JavaDoc<Tunnel> getTunnels(int realmID) throws Exception JavaDoc;
89
90     /**
91      * Remove a tunnel
92      *
93      * @param id
94      * @return Tunnel the tunnel removed
95      * @throws Exception
96      */

97     public Tunnel removeTunnel(int id) throws Exception JavaDoc;
98
99     /**
100      * Get the tunnel with a given resource id.
101      *
102      * @param id the tunnel resource id
103      * @return Tunnel get the tunnel
104      * @throws Exception
105      */

106     public Tunnel getTunnel(int id) throws Exception JavaDoc;
107     
108     /**
109      * Get the tunnel with a given resource name.
110      *
111      * @param name
112      * @param realmID
113      * @return
114      * @throws Exception
115      */

116     public Tunnel getTunnel(String JavaDoc name, int realmID) throws Exception JavaDoc;
117
118 }
Popular Tags