Source code: com/mjh/switchrmi/RmiContext.java
1 //
2 // SwitchRMI Framework
3 // Copyright (c) 2000-2002 by Michael J. Henderson & Associates.
4 //
5 // Michael Henderson
6 // http://switchrmi.sf.net
7 // mailto:mikehenderson@dunelm.org.uk
8 //
9 // This library is free software.
10 //
11 // You may redistribute it and/or modify it under the terms of the GNU
12 // Lesser General Public License as published by the Free Software Foundation.
13 //
14 // Version 2.1 of the license should be included with this distribution in
15 // the file LICENSE, as well as License.html. If the license is not
16 // included with this distribution, you may find a copy at the FSF web
17 // site at 'www.gnu.org' or 'www.fsf.org', or you may write to the
18 // Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139 USA.
19 //
20 // This library is distributed in the hope that it will be useful,
21 // but WITHOUT ANY WARRANTY; without even the implied waranty of
22 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 // Lesser General Public License for more details.
24 //
25 // $Id: RmiContext.java,v 1.1 2002/11/11 22:19:48 mikehenderson Exp $
26 package com.mjh.switchrmi;
27
28 import com.mjh.util.UrlInfo;
29
30 import java.net.MalformedURLException;
31
32 import javax.naming.*;
33
34 public interface RmiContext
35 {
36 public boolean isClient();
37
38 public boolean isService();
39
40 public void setUrl(String url);
41
42 public String getUrl();
43
44 public UrlInfo getUrlInfo()
45 throws MalformedURLException;
46
47 public void setTransport(RmiTransport transport);
48
49 public RmiTransport getTransport();
50
51 public void setProtocol(RmiProtocol protocol);
52
53 public RmiProtocol getProtocol();
54
55 public void setTarget(Object target);
56
57 public Object getTarget();
58
59 public String getObjectName();
60
61 public String getTransportName();
62
63 public String getProtocolName();
64
65 public void setSessionIdentifier(Object identifier);
66
67 public Object getSessionIdentifier();
68
69 public Object lookup(String name)
70 throws Exception;
71
72 public Context getJndiContext();
73 }