本文整理汇总了Java中sun.rmi.registry.RegistryImpl类的典型用法代码示例。如果您正苦于以下问题:Java RegistryImpl类的具体用法?Java RegistryImpl怎么用?Java RegistryImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RegistryImpl类属于sun.rmi.registry包,在下文中一共展示了RegistryImpl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shutdown
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
/**
* Shutdown the activation system. Destroys all groups spawned by
* the activation daemon and exits the activation daemon.
*/
public void shutdown() throws AccessException {
RegistryImpl.checkAccess("ActivationSystem.shutdown");
Object lock = startupLock;
if (lock != null) {
synchronized (lock) {
// nothing
}
}
synchronized (Activation.this) {
if (!shuttingDown) {
shuttingDown = true;
(new Shutdown()).start();
}
}
}
示例2: getRegistryPort
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
/**
* Returns the port number the RMI {@link Registry} is running on.
*
* @param registry the registry to find the port of.
* @return the port number the registry is using.
* @throws RuntimeException if there was a problem getting the port number.
*/
public static int getRegistryPort(Registry registry) {
int port = -1;
try {
RemoteRef remoteRef = ((RegistryImpl)registry).getRef();
LiveRef liveRef = ((UnicastServerRef)remoteRef).getLiveRef();
Endpoint endpoint = liveRef.getChannel().getEndpoint();
TCPEndpoint tcpEndpoint = (TCPEndpoint) endpoint;
port = tcpEndpoint.getPort();
} catch (Exception ex) {
throw new RuntimeException("Error getting registry port.", ex);
}
return port;
}
示例3: checkRmiRegistry
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
private static void checkRmiRegistry() {
final String rmiRegistryProperty = System.getProperty(RMIREGISTRY_PROPERTY);
String portArg = null;
if (rmiRegistryProperty != null) {
if (rmiRegistryProperty.length() > 0) {
portArg = rmiRegistryProperty;
}
final String[] args = portArg == null ? new String[0] : new String[] {portArg};
final Thread registry = new Thread() {
@Override
public void run() {
try {
RegistryImpl.main(args);
} catch (Throwable ex) {
ex.printStackTrace();
VEError.unexpected("rmiregistry failed");
}
}
};
registry.setName("RMIRegistry");
registry.setDaemon(true);
registry.start();
}
}
示例4: inactiveObject
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public void inactiveObject(ActivationID id)
throws UnknownObjectException, RemoteException
{
try {
checkShutdown();
} catch (ActivationException e) {
return;
}
RegistryImpl.checkAccess("Activator.inactiveObject");
getGroupEntry(id).inactiveObject(id);
}
示例5: activeObject
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public void activeObject(ActivationID id,
MarshalledObject<? extends Remote> mobj)
throws UnknownObjectException, RemoteException
{
try {
checkShutdown();
} catch (ActivationException e) {
return;
}
RegistryImpl.checkAccess("ActivationSystem.activeObject");
getGroupEntry(id).activeObject(id, mobj);
}
示例6: inactiveGroup
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public void inactiveGroup(ActivationGroupID id,
long incarnation)
throws UnknownGroupException, RemoteException
{
try {
checkShutdown();
} catch (ActivationException e) {
return;
}
RegistryImpl.checkAccess("ActivationMonitor.inactiveGroup");
getGroupEntry(id).inactiveGroup(incarnation, false);
}
示例7: registerObject
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public ActivationID registerObject(ActivationDesc desc)
throws ActivationException, UnknownGroupException, RemoteException
{
checkShutdown();
RegistryImpl.checkAccess("ActivationSystem.registerObject");
ActivationGroupID groupID = desc.getGroupID();
ActivationID id = new ActivationID(activatorStub);
getGroupEntry(groupID).registerObject(id, desc, true);
return id;
}
示例8: unregisterObject
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public void unregisterObject(ActivationID id)
throws ActivationException, UnknownObjectException, RemoteException
{
checkShutdown();
RegistryImpl.checkAccess("ActivationSystem.unregisterObject");
getGroupEntry(id).unregisterObject(id, true);
}
示例9: registerGroup
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public ActivationGroupID registerGroup(ActivationGroupDesc desc)
throws ActivationException, RemoteException
{
checkShutdown();
RegistryImpl.checkAccess("ActivationSystem.registerGroup");
checkArgs(desc, null);
ActivationGroupID id = new ActivationGroupID(systemStub);
GroupEntry entry = new GroupEntry(id, desc);
// table insertion must take place before log update
groupTable.put(id, entry);
addLogRecord(new LogRegisterGroup(id, desc));
return id;
}
示例10: activeGroup
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public ActivationMonitor activeGroup(ActivationGroupID id,
ActivationInstantiator group,
long incarnation)
throws ActivationException, UnknownGroupException, RemoteException
{
checkShutdown();
RegistryImpl.checkAccess("ActivationSystem.activeGroup");
getGroupEntry(id).activeGroup(group, incarnation);
return monitor;
}
示例11: unregisterGroup
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public void unregisterGroup(ActivationGroupID id)
throws ActivationException, UnknownGroupException, RemoteException
{
checkShutdown();
RegistryImpl.checkAccess("ActivationSystem.unregisterGroup");
// remove entry before unregister so state is updated before
// logged
removeGroupEntry(id).unregisterGroup(true);
}
示例12: setActivationDesc
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public ActivationDesc setActivationDesc(ActivationID id,
ActivationDesc desc)
throws ActivationException, UnknownObjectException, RemoteException
{
checkShutdown();
RegistryImpl.checkAccess("ActivationSystem.setActivationDesc");
if (!getGroupID(id).equals(desc.getGroupID())) {
throw new ActivationException(
"ActivationDesc contains wrong group");
}
return getGroupEntry(id).setActivationDesc(id, desc, true);
}
示例13: setActivationGroupDesc
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public ActivationGroupDesc setActivationGroupDesc(ActivationGroupID id,
ActivationGroupDesc desc)
throws ActivationException, UnknownGroupException, RemoteException
{
checkShutdown();
RegistryImpl.checkAccess(
"ActivationSystem.setActivationGroupDesc");
checkArgs(desc, null);
return getGroupEntry(id).setActivationGroupDesc(id, desc, true);
}
示例14: getActivationDesc
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public ActivationDesc getActivationDesc(ActivationID id)
throws ActivationException, UnknownObjectException, RemoteException
{
checkShutdown();
RegistryImpl.checkAccess("ActivationSystem.getActivationDesc");
return getGroupEntry(id).getActivationDesc(id);
}
示例15: getActivationGroupDesc
import sun.rmi.registry.RegistryImpl; //导入依赖的package包/类
public ActivationGroupDesc getActivationGroupDesc(ActivationGroupID id)
throws ActivationException, UnknownGroupException, RemoteException
{
checkShutdown();
RegistryImpl.checkAccess
("ActivationSystem.getActivationGroupDesc");
return getGroupEntry(id).desc;
}