~ubuntu-branches/ubuntu/raring/libjboss-remoting-java/raring

« back to all changes in this revision

Viewing changes to tests/org/jboss/test/remoting/transport/socket/serverlockup/SimpleServerInvocationHandler.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-09 14:01:03 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909140103-hqokx61534tas9rg
Tags: 2.5.3.SP1-1
* Newer but not newest upstream release. Do not build samples.
* Change debian/watch to upstream's svn repo.
* Add patch to fix compile error caused by tomcat update.
  (Closes: #628303)
* Switch to source format 3.0.
* Switch to debhelper level 7.
* Remove useless Depends.
* Update Standards-Version: 3.9.2.
* Update README.source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * JBoss, Home of Professional Open Source
3
 
 *
4
 
 * Distributable under LGPL license.
5
 
 * See terms of license at gnu.org.
6
 
 */
7
 
package org.jboss.test.remoting.transport.socket.serverlockup;
8
 
 
9
 
import org.jboss.remoting.ServerInvocationHandler;
10
 
import org.jboss.remoting.ServerInvoker;
11
 
import org.jboss.remoting.InvocationRequest;
12
 
import org.jboss.remoting.invocation.NameBasedInvocation;
13
 
import org.jboss.remoting.callback.InvokerCallbackHandler;
14
 
import org.jboss.logging.Logger;
15
 
 
16
 
import javax.management.MBeanServer;
17
 
 
18
 
/**
19
 
 * @author <a href="mailto:ovidiu@jboss.org">Ovidiu Feodorov</a>
20
 
 * @version <tt>$Revision: 1814 $</tt>
21
 
 *
22
 
 * $Id: SimpleServerInvocationHandler.java 1814 2007-01-13 12:42:36Z ovidiu $
23
 
 */
24
 
public class SimpleServerInvocationHandler implements ServerInvocationHandler
25
 
{
26
 
   // Constants ------------------------------------------------------------------------------------
27
 
 
28
 
   private static final Logger log = Logger.getLogger(SimpleServerInvocationHandler.class);
29
 
 
30
 
   // Static ---------------------------------------------------------------------------------------
31
 
 
32
 
   // Attributes -----------------------------------------------------------------------------------
33
 
 
34
 
   // Constructors ---------------------------------------------------------------------------------
35
 
 
36
 
   // ServerInvocationHandler implementation -------------------------------------------------------
37
 
 
38
 
   public void setMBeanServer(MBeanServer server)
39
 
   {
40
 
   }
41
 
 
42
 
   public void setInvoker(ServerInvoker invoker)
43
 
   {
44
 
   }
45
 
 
46
 
   public Object invoke(InvocationRequest invocation) throws Throwable
47
 
   {
48
 
      NameBasedInvocation nbi = (NameBasedInvocation)invocation.getParameter();
49
 
 
50
 
      String methodName = nbi.getMethodName();
51
 
 
52
 
      if ("ping".equals(methodName))
53
 
      {
54
 
         return "pong." + nbi.getParameters()[0];
55
 
      }
56
 
 
57
 
      return null;
58
 
   }
59
 
 
60
 
   public void addListener(InvokerCallbackHandler callbackHandler)
61
 
   {
62
 
   }
63
 
 
64
 
   public void removeListener(InvokerCallbackHandler callbackHandler)
65
 
   {
66
 
   }
67
 
 
68
 
   // Public ---------------------------------------------------------------------------------------
69
 
 
70
 
   // Package protected ----------------------------------------------------------------------------
71
 
 
72
 
   // Protected ------------------------------------------------------------------------------------
73
 
 
74
 
   // Private --------------------------------------------------------------------------------------
75
 
 
76
 
   // Inner classes --------------------------------------------------------------------------------
77
 
 
78
 
}