public final class RmiServerImpl extends UnicastRemoteObject implements RmiServer
refDEFAULT_RMI_PORT| Constructor and Description |
|---|
RmiServerImpl() |
RmiServerImpl(int port) |
RmiServerImpl(String hostName,
int port) |
RmiServerImpl(String hostName,
int port,
String remoteHostName,
int remotePort) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTrigger(ConnectTrigger trigger) |
<T> T |
getObject(Class<T> type)
根据类型获取对象
|
<T> T |
getObject(String name)
返回对象
|
<T> List<T> |
getObjectList(Class<T> type)
根据类型返回对象列表
|
<T> List<T> |
getObjectList(String typeName)
根据类型返回对象列表
|
Registry |
getRegistry()
返回本地对象注册表
|
<T> List<T> |
getRemoteObjectListInstanceOf(Class<T> type) |
Registry |
getRemoteRegistry() |
void |
registerLocalObject(Remote object,
Class type)
按类型名称注册本地对象,如果此类型已经存在对象,则已经存在的对象将被替换
|
void |
registerLocalObject(Remote object,
Class type,
String id)
注册本地对象,类型及ID
|
void |
registerLocalObject(Remote object,
String name)
注册本地对象,类型及ID
|
void |
registerLocalObject(Remote object,
String type,
String id)
注册本地对象,类型及ID
|
void |
registerRemoteObject(Remote object,
Class type)
按类型名称注册远程对象,在Server中仅仅将该对象存放在内存map中,如果此类型已经存在对象,则已经存在的对象将被替换
|
void |
registerRemoteObject(Remote object,
Class type,
String id)
注册远程对象,类型及ID,在Server中仅仅将该对象存放在内存map中
|
void |
registerRemoteObject(Remote object,
String name)
注册远程对象,类型及ID,在Server中仅仅将该对象存放在内存map中
|
void |
registerRemoteObject(Remote object,
String type,
String id)
注册远程对象,类型及ID,在Server中仅仅将该对象存放在内存map中
|
void |
stop()
停止RMIServer
|
void |
stopLocalRegistry() |
void |
unexportObjects()
停止所有提供远程访问的对象
|
void |
unregisterObject(Class type,
String id)
根据类型注销对象
|
void |
unregisterObject(Remote object)
停止具体的注册在此远程服务中心的本地对象
|
void |
unregisterObject(String name)
根据名称注销对象
|
void |
unregisterObject(String type,
String id)
根据类型注销对象
|
void |
unregisterObjectByType(Class type)
根据类型注销对象
|
void |
unregisterObjectByType(String type)
根据类型注销对象
|
clone, exportObject, exportObject, exportObject, unexportObjectgetClientHost, getLog, setLogpublic RmiServerImpl()
throws RemoteException
RemoteExceptionpublic RmiServerImpl(int port)
throws RemoteException
RemoteExceptionpublic RmiServerImpl(String hostName, int port) throws RemoteException
RemoteExceptionpublic RmiServerImpl(String hostName, int port, String remoteHostName, int remotePort) throws RemoteException
RemoteExceptionpublic Registry getRegistry() throws RemoteException
RmiServergetRegistry in interface RmiServerRemoteExceptionpublic Registry getRemoteRegistry() throws RemoteException
RemoteExceptionpublic void stop()
throws RemoteException
RmiServerstop in interface RmiServerRemoteExceptionpublic void stopLocalRegistry()
throws RemoteException
RemoteExceptionpublic void addTrigger(ConnectTrigger trigger) throws RemoteException
addTrigger in interface RmiServerRemoteExceptionpublic void registerLocalObject(Remote object, String name) throws RemoteException
RmiServerregisterLocalObject in interface RmiServername - 名字如果重复,已经存在的对象将被替换,全局唯一RemoteExceptionpublic void registerLocalObject(Remote object, Class type, String id) throws RemoteException
RmiServerregisterLocalObject in interface RmiServertype - 注册的对象类型,可以重复id - 注册的对象的ID,相同类型不可以重复,不同类型可以重复RemoteExceptionpublic void registerLocalObject(Remote object, String type, String id) throws RemoteException
RmiServerregisterLocalObject in interface RmiServertype - 注册的对象类型,可以重复id - 注册的对象的ID,相同类型不可以重复,不同类型可以重复RemoteExceptionpublic void registerLocalObject(Remote object, Class type) throws RemoteException
RmiServerregisterLocalObject in interface RmiServerRemoteExceptionpublic void registerRemoteObject(Remote object, Class type, String id) throws RemoteException
RmiServerregisterRemoteObject in interface RmiServertype - 注册的远程对象类型,可以重复id - 注册的远程对象的ID,相同类型不可以重复,不同类型可以重复RemoteExceptionpublic void registerRemoteObject(Remote object, String type, String id) throws RemoteException
RmiServerregisterRemoteObject in interface RmiServertype - 注册的对象类型,可以重复id - 注册的对象的ID,相同类型不可以重复,不同类型可以重复RemoteExceptionpublic void registerRemoteObject(Remote object, String name) throws RemoteException
RmiServerregisterRemoteObject in interface RmiServername - 名字如果重复,已经存在的对象将被替换,全局唯一RemoteExceptionpublic void registerRemoteObject(Remote object, Class type) throws RemoteException
RmiServerregisterRemoteObject in interface RmiServerRemoteExceptionpublic void unregisterObject(Remote object) throws RemoteException
RmiServerunregisterObject in interface RmiServerRemoteExceptionpublic void unregisterObject(String name) throws RemoteException
RmiServerunregisterObject in interface RmiServername - 要注销的对象名RemoteExceptionpublic void unregisterObjectByType(Class type) throws RemoteException
RmiServerunregisterObjectByType in interface RmiServertype - 要注销的对象类型,所有匹配的对象都会被注销RemoteExceptionpublic void unregisterObjectByType(String type) throws RemoteException
RmiServerunregisterObjectByType in interface RmiServerRemoteExceptionpublic void unregisterObject(String type, String id) throws RemoteException
RmiServerunregisterObject in interface RmiServertype - 要注销的类型id - 要注销的IDRemoteExceptionpublic void unregisterObject(Class type, String id) throws RemoteException
RmiServerunregisterObject in interface RmiServertype - 要注销的类型id - 要注销的IDRemoteExceptionpublic <T> T getObject(String name) throws RemoteException
RmiServergetObject in interface RmiServerRemoteExceptionpublic <T> T getObject(Class<T> type) throws RemoteException
RmiServergetObject in interface RmiServerRemoteExceptionpublic <T> List<T> getObjectList(Class<T> type) throws RemoteException
RmiServergetObjectList in interface RmiServerRemoteExceptionpublic <T> List<T> getObjectList(String typeName) throws RemoteException
RmiServergetObjectList in interface RmiServerRemoteExceptionpublic <T> List<T> getRemoteObjectListInstanceOf(Class<T> type) throws RemoteException
getRemoteObjectListInstanceOf in interface RmiServerRemoteExceptionpublic void unexportObjects()
throws RemoteException
RmiServerunexportObjects in interface RmiServerRemoteExceptionCopyright © 2006–2018 TinyGroup. All rights reserved.