org.jboss.ejb3.testremote.server
Class MockServerInvocationHandler

java.lang.Object
  extended by org.jboss.ejb3.testremote.server.MockServerInvocationHandler
All Implemented Interfaces:
org.jboss.remoting.ServerInvocationHandler

public class MockServerInvocationHandler
extends Object
implements org.jboss.remoting.ServerInvocationHandler

MockServerInvocationHandler

Version:
$Revision: $
Author:
Jaikiran Pai

Constructor Summary
MockServerInvocationHandler(MockServer mockServer)
          Constructor
 
Method Summary
 void addListener(org.jboss.remoting.callback.InvokerCallbackHandler callbackHandler)
           
 Object invoke(org.jboss.remoting.InvocationRequest invocationRequest)
          On receiving a MockServer.MockServerRequest the invocation handler will carry out appropriate operation on the MockServer
Supported requests are
MockServerRequest.START - On receiving this request, the invocation handler will start the MockServer MockServerRequest.STOP - On receiving this request, the invocation handler will stop the MockServer
 void removeListener(org.jboss.remoting.callback.InvokerCallbackHandler callbackHandler)
           
 void setInvoker(org.jboss.remoting.ServerInvoker invoker)
           
 void setMBeanServer(MBeanServer server)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.remoting.ServerInvocationHandler
toString
 

Constructor Detail

MockServerInvocationHandler

public MockServerInvocationHandler(MockServer mockServer)
Constructor

Parameters:
mockServer -
Method Detail

addListener

public void addListener(org.jboss.remoting.callback.InvokerCallbackHandler callbackHandler)
Specified by:
addListener in interface org.jboss.remoting.ServerInvocationHandler
See Also:
ServerInvocationHandler.addListener(org.jboss.remoting.callback.InvokerCallbackHandler)

invoke

public Object invoke(org.jboss.remoting.InvocationRequest invocationRequest)
              throws Throwable
On receiving a MockServer.MockServerRequest the invocation handler will carry out appropriate operation on the MockServer
Supported requests are
    • MockServerRequest.START - On receiving this request, the invocation handler will start the MockServer
      MockServerRequest.STOP - On receiving this request, the invocation handler will stop the MockServer
  • Specified by:
    invoke in interface org.jboss.remoting.ServerInvocationHandler
    Throws:
    {@link - IllegalArgumentException} If the invocationRequest is not supported
    Throwable
    See Also:
    ServerInvocationHandler.invoke(org.jboss.remoting.InvocationRequest)

    removeListener

    public void removeListener(org.jboss.remoting.callback.InvokerCallbackHandler callbackHandler)
    Specified by:
    removeListener in interface org.jboss.remoting.ServerInvocationHandler
    See Also:
    ServerInvocationHandler.removeListener(org.jboss.remoting.callback.InvokerCallbackHandler)

    setInvoker

    public void setInvoker(org.jboss.remoting.ServerInvoker invoker)
    Specified by:
    setInvoker in interface org.jboss.remoting.ServerInvocationHandler
    See Also:
    ServerInvocationHandler.setInvoker(org.jboss.remoting.ServerInvoker)

    setMBeanServer

    public void setMBeanServer(MBeanServer server)
    Specified by:
    setMBeanServer in interface org.jboss.remoting.ServerInvocationHandler
    See Also:
    ServerInvocationHandler.setMBeanServer(javax.management.MBeanServer)


    Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.