public interface RmiServer extends Remote, Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_RMI_PORT |
| 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) |
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 |
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)
根据类型注销对象
|
static final int DEFAULT_RMI_PORT
void addTrigger(ConnectTrigger trigger) throws RemoteException
RemoteExceptionRegistry getRegistry() throws RemoteException
RemoteExceptionvoid registerLocalObject(Remote object, Class type, String id) throws RemoteException
type - 注册的对象类型,可以重复id - 注册的对象的ID,相同类型不可以重复,不同类型可以重复object - RemoteExceptionvoid registerLocalObject(Remote object, String type, String id) throws RemoteException
type - 注册的对象类型,可以重复id - 注册的对象的ID,相同类型不可以重复,不同类型可以重复object - RemoteExceptionvoid registerLocalObject(Remote object, String name) throws RemoteException
name - 名字如果重复,已经存在的对象将被替换,全局唯一object - RemoteExceptionvoid registerLocalObject(Remote object, Class type) throws RemoteException
type - object - RemoteExceptionvoid registerRemoteObject(Remote object, Class type, String id) throws RemoteException
type - 注册的远程对象类型,可以重复id - 注册的远程对象的ID,相同类型不可以重复,不同类型可以重复object - RemoteExceptionvoid registerRemoteObject(Remote object, String type, String id) throws RemoteException
type - 注册的对象类型,可以重复id - 注册的对象的ID,相同类型不可以重复,不同类型可以重复object - RemoteExceptionvoid registerRemoteObject(Remote object, String name) throws RemoteException
name - 名字如果重复,已经存在的对象将被替换,全局唯一object - RemoteExceptionvoid registerRemoteObject(Remote object, Class type) throws RemoteException
type - object - RemoteException<T> List<T> getRemoteObjectListInstanceOf(Class<T> type) throws RemoteException
RemoteExceptionvoid unregisterObject(String name) throws RemoteException
name - 要注销的对象名RemoteExceptionvoid unregisterObjectByType(Class type) throws RemoteException
type - 要注销的对象类型,所有匹配的对象都会被注销RemoteExceptionvoid unregisterObjectByType(String type) throws RemoteException
type - RemoteExceptionvoid unregisterObject(String type, String id) throws RemoteException
type - 要注销的类型id - 要注销的IDRemoteExceptionvoid unregisterObject(Class type, String id) throws RemoteException
type - 要注销的类型id - 要注销的IDRemoteExceptionvoid unregisterObject(Remote object) throws RemoteException
object - RemoteException<T> T getObject(String name) throws RemoteException
T - name - RemoteException<T> T getObject(Class<T> type) throws RemoteException
T - type - RemoteException<T> List<T> getObjectList(Class<T> type) throws RemoteException
T - type - RemoteException<T> List<T> getObjectList(String typeName) throws RemoteException
T - typeName - RemoteExceptionvoid unexportObjects()
throws RemoteException
RemoteExceptionvoid stop() throws RemoteException
RemoteExceptionCopyright © 2006–2018 TinyGroup. All rights reserved.