Java Code Examples for sun.rmi.registry.RegistryImpl#checkAccess()

The following examples show how to use sun.rmi.registry.RegistryImpl#checkAccess() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Activation.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 2
Source File: Activation.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example 3
Source File: Activation.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 4
Source File: Activation.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void inactiveObject(ActivationID id)
    throws UnknownObjectException, RemoteException
{
    try {
        checkShutdown();
    } catch (ActivationException e) {
        return;
    }
    RegistryImpl.checkAccess("Activator.inactiveObject");
    getGroupEntry(id).inactiveObject(id);
}
 
Example 5
Source File: Activation.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void unbind(String name)
    throws RemoteException, NotBoundException, AccessException
{
    if (name.equals(NAME)) {
        throw new AccessException(
            "unbinding ActivationSystem is disallowed");
    } else {
        RegistryImpl.checkAccess("ActivationSystem.unbind");
        super.unbind(name);
    }
}
 
Example 6
Source File: Activation.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 7
Source File: Activation.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void rebind(String name, Remote obj)
    throws RemoteException, AccessException
{
    if (name.equals(NAME)) {
        throw new AccessException(
            "binding ActivationSystem is disallowed");
    } else {
        RegistryImpl.checkAccess("ActivationSystem.rebind");
        super.rebind(name, obj);
    }
}
 
Example 8
Source File: Activation.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 9
Source File: Activation.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 10
Source File: Activation.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void unbind(String name)
    throws RemoteException, NotBoundException, AccessException
{
    if (name.equals(NAME)) {
        throw new AccessException(
            "unbinding ActivationSystem is disallowed");
    } else {
        RegistryImpl.checkAccess("ActivationSystem.unbind");
        super.unbind(name);
    }
}
 
Example 11
Source File: Activation.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void bind(String name, Remote obj)
    throws RemoteException, AlreadyBoundException, AccessException
{
    if (name.equals(NAME)) {
        throw new AccessException(
            "binding ActivationSystem is disallowed");
    } else {
        RegistryImpl.checkAccess("ActivationSystem.bind");
        super.bind(name, obj);
    }
}
 
Example 12
Source File: Activation.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void unbind(String name)
    throws RemoteException, NotBoundException, AccessException
{
    if (name.equals(NAME)) {
        throw new AccessException(
            "unbinding ActivationSystem is disallowed");
    } else {
        RegistryImpl.checkAccess("ActivationSystem.unbind");
        super.unbind(name);
    }
}
 
Example 13
Source File: Activation.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example 14
Source File: Activation.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 15
Source File: Activation.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 16
Source File: Activation.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 17
Source File: Activation.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void rebind(String name, Remote obj)
    throws RemoteException, AccessException
{
    if (name.equals(NAME)) {
        throw new AccessException(
            "binding ActivationSystem is disallowed");
    } else {
        RegistryImpl.checkAccess("ActivationSystem.rebind");
        super.rebind(name, obj);
    }
}
 
Example 18
Source File: Activation.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void unbind(String name)
    throws RemoteException, NotBoundException, AccessException
{
    if (name.equals(NAME)) {
        throw new AccessException(
            "unbinding ActivationSystem is disallowed");
    } else {
        RegistryImpl.checkAccess("ActivationSystem.unbind");
        super.unbind(name);
    }
}
 
Example 19
Source File: Activation.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void unmarshalCustomCallData(ObjectInput in) throws IOException, ClassNotFoundException {
    RegistryImpl.checkAccess(accessKind);
    super.unmarshalCustomCallData(in);
}
 
Example 20
Source File: Activation.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void unmarshalCustomCallData(ObjectInput in) throws IOException, ClassNotFoundException {
    RegistryImpl.checkAccess(accessKind);
    super.unmarshalCustomCallData(in);
}