net.sf.crispy.impl.rmi
Class MiniRmiServer

java.lang.Object
  extended bynet.sf.crispy.impl.rmi.MiniRmiServer
All Implemented Interfaces:
MiniServer

public class MiniRmiServer
extends java.lang.Object
implements MiniServer

MiniRmiServer has the function to simulate a RMI Server. This is useful for test the RMI Client. Do not use this Server in production.

Author:
Linke

Field Summary
protected static org.apache.commons.logging.Log log
           
static int PORT
           
 
Constructor Summary
MiniRmiServer()
           
MiniRmiServer(int pvPort)
           
MiniRmiServer(int pvPort, RmiInvocationHandler pvRmiInvocationHandler)
           
 
Method Summary
 void addService(java.lang.String pvLookName, java.lang.Object pvServiceObject)
           
 void addService(java.lang.String pvLookName, java.rmi.Remote pvServiceObject)
           
 void addService(java.lang.String pvServiceInterface, java.lang.String pvServiceObject)
          Add services to the server
 RmiInvocationHandler getDefaultRmiInvocationHandler()
           
 InterceptorHandlerCreator getInterceptorHandlerCreator()
           
static MiniRmiServer getLastStartedRmiServer()
           
 int getPort()
           
static java.rmi.registry.Registry getRegistry(int pvPort)
           
 RmiInvocationHandler getRmiInvocationHandler()
           
 java.lang.String getUrlAndPort()
           
static boolean isStarted()
           
static void main(java.lang.String[] args)
           
 void removeService(java.lang.String pvLookName)
           
 void setInterceptorHandlerCreator(InterceptorHandlerCreator pvCreator)
           
 void setUrlAndPort(java.lang.String pvUrlAndPort)
           
 void start()
          Start the Server.
 void stop()
          Stop the Server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

public static final int PORT
See Also:
Constant Field Values

log

protected static final org.apache.commons.logging.Log log
Constructor Detail

MiniRmiServer

public MiniRmiServer()

MiniRmiServer

public MiniRmiServer(int pvPort,
                     RmiInvocationHandler pvRmiInvocationHandler)

MiniRmiServer

public MiniRmiServer(int pvPort)
Method Detail

getPort

public final int getPort()

isStarted

public static boolean isStarted()

getLastStartedRmiServer

public static MiniRmiServer getLastStartedRmiServer()

setUrlAndPort

public void setUrlAndPort(java.lang.String pvUrlAndPort)

getUrlAndPort

public java.lang.String getUrlAndPort()

getRmiInvocationHandler

public RmiInvocationHandler getRmiInvocationHandler()

getDefaultRmiInvocationHandler

public RmiInvocationHandler getDefaultRmiInvocationHandler()

setInterceptorHandlerCreator

public void setInterceptorHandlerCreator(InterceptorHandlerCreator pvCreator)

getInterceptorHandlerCreator

public InterceptorHandlerCreator getInterceptorHandlerCreator()

addService

public void addService(java.lang.String pvServiceInterface,
                       java.lang.String pvServiceObject)
Description copied from interface: MiniServer
Add services to the server

Specified by:
addService in interface MiniServer
Parameters:
pvServiceInterface - Interface of the service.
pvServiceObject - Implementation of the service.

addService

public void addService(java.lang.String pvLookName,
                       java.lang.Object pvServiceObject)

addService

public void addService(java.lang.String pvLookName,
                       java.rmi.Remote pvServiceObject)

removeService

public void removeService(java.lang.String pvLookName)

getRegistry

public static java.rmi.registry.Registry getRegistry(int pvPort)

start

public void start()
Description copied from interface: MiniServer
Start the Server.

Specified by:
start in interface MiniServer

stop

public void stop()
Description copied from interface: MiniServer
Stop the Server.

Specified by:
stop in interface MiniServer

main

public static void main(java.lang.String[] args)


Copyright © 2005-2006 Crispy. All Rights Reserved.