当前位置: 首页>>代码示例>>Java>>正文


Java RegistryImpl类代码示例

本文整理汇总了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();
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:Activation.java

示例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;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:23,代码来源:TestLibrary.java

示例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();
    }
}
 
开发者ID:SnakeDoc,项目名称:GuestVM,代码行数:25,代码来源:VERunScheme.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:Activation.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:Activation.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:Activation.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:Activation.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:Activation.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:Activation.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:Activation.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:Activation.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:Activation.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:Activation.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:Activation.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:Activation.java


注:本文中的sun.rmi.registry.RegistryImpl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。