01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * published by the Free Software Foundation; either version 2.1 of
10: * the License, or (at your option) any later version.
11: *
12: * This software is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this software; if not, write to the Free
19: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21: */
22: package org.jboss.invocation;
23:
24: import java.rmi.Remote;
25:
26: import org.jboss.proxy.Interceptor;
27:
28: import org.jboss.util.id.GUID;
29:
30: /**
31: * This invoker carries Invocation in the JMX target node.
32: *
33: * <p>
34: * The interface in the current JBoss can be implemented with Remote/local switches or
35: * with clustered invokers, this interface just masks the network details and the topology
36: * of the JMX nodes for the client proxies.
37: *
38: * @author <a href="mailto:marc@jboss.org">Marc Fleury</a>
39: * @version $Revision: 57209 $
40: *
41: * <p><b>Revisions:</b>
42: *
43: * <p><b>20011114 marc fleury:</b>
44: * <ul>
45: * <li>Initial check-in
46: * </ul>
47: */
48: public interface Invoker extends Remote {
49: /**
50: * A globaly unique identifier use to determine if an instance is local
51: * to the invoker.
52: */
53: GUID ID = new GUID();
54:
55: /**
56: * A free form String identifier for this delegate invoker, can be clustered or target node
57: * This should evolve in a more advanced meta-inf object
58: */
59: String getServerHostName() throws Exception;
60:
61: /**
62: * The invoke with an Invocation Object.
63: *
64: * <p>
65: * the delegate can handle network protocols on behalf of proxies (proxies delegate to these
66: * puppies). We provide default implemenations with JRMP/Local/Clustered invokers.
67: * The delegates are not tied to a type of invocation (EJB or generic RMI).
68: *
69: * @param invocation A pointer to the invocation object
70: * @return Return value of method invocation.
71: *
72: * @throws Exception Failed to invoke method.
73: */
74: Object invoke(Invocation invocation) throws Exception;
75: }
|