类 RMIUtil
java.lang.Object
com.sh.util.communication.rmi.RMIUtil
Description:
Title:首亨软件 - TSS/CRM等
- 从以下版本开始:
- Jul 5, 2012
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Object调用资源服务器注册接口static Objectstatic Object查找资源static Objectstatic voidstatic booleanregisterServer(String serverName, Remote obj, int port) 注册服务static booleanstartServer(int port) 启动RMI服务
-
构造器详细资料
-
RMIUtil
public RMIUtil()
-
-
方法详细资料
-
startServer
public static boolean startServer(int port) 启动RMI服务- 参数:
port- 端口号- 返回:
- boolean
-
registerServer
注册服务- 参数:
serverName- 服务名obj- 实现对象port- 端口号- 返回:
- boolean
-
findRes
public static Object findRes(String serverName) throws MalformedURLException, RemoteException, NotBoundException 调用资源服务器注册接口- 参数:
serverName- 服务名- 返回:
- Object
- 抛出:
MalformedURLException- MalformedURLExceptionRemoteException- RemoteExceptionNotBoundException- NotBoundException
-
lookup
public static Object lookup(String ip, int port, String serverName) throws MalformedURLException, RemoteException, NotBoundException 查找资源- 参数:
ip- 服务端IPport- 通迅端口,默认:1099serverName- 服务名- 返回:
- Object
- 抛出:
MalformedURLException- MalformedURLExceptionRemoteException- RemoteExceptionNotBoundException- NotBoundException
-
lookup
public static Object lookup(String serverName) throws MalformedURLException, RemoteException, NotBoundException -
lookup
public static Object lookup(String ip, String serverName) throws MalformedURLException, RemoteException, NotBoundException -
main
-