Search in sources :

Example 6 with Pinger

use of org.ow2.proactive.resourcemanager.frontend.topology.pinging.Pinger in project scheduling by ow2-proactive.

the class NodeSource method initActivity.

/**
 * Initialization of node source. Creates and activates a pinger to monitor nodes.
 *
 * @param body active object body
 */
public void initActivity(Body body) {
    this.stub = (NodeSource) PAActiveObject.getStubOnThis();
    this.infrastructureManager.setNodeSource(this);
    // Infrastructure has been configured and linked to the node source, so we can now persist the runtime
    // variables of the infrastructure for the first time (they have been initialized during the creation of the
    // infrastructure, in its configuration.
    this.infrastructureManager.persistInfrastructureVariables();
    this.activePolicy.setNodeSource((NodeSource) PAActiveObject.getStubOnThis());
    // Set permissions again according to the activated node source policy
    // node source admin permission
    // it's the PrincipalPermission of the user who created the node source
    this.adminPermission = new PrincipalPermission(this.administrator.getName(), this.administrator.getSubject().getPrincipals(UserNamePrincipal.class));
    // creating node source provider permission
    // could be one of the following: PrincipalPermission (NS creator) or PrincipalPermission (NS creator groups)
    // or PrincipalPermission (anyone)
    this.providerPermission = new PrincipalPermission(this.administrator.getName(), this.activePolicy.getProviderAccessType().getIdentityPrincipals(this.administrator));
    this.nodeUserAccessType = this.activePolicy.getUserAccessType();
    Thread.currentThread().setName("Node Source \"" + this.name + "\"");
}
Also used : PrincipalPermission(org.ow2.proactive.permissions.PrincipalPermission)

Aggregations

InetAddress (java.net.InetAddress)2 Node (org.objectweb.proactive.core.node.Node)2 PrincipalPermission (org.ow2.proactive.permissions.PrincipalPermission)2 RMNode (org.ow2.proactive.resourcemanager.rmnode.RMNode)2 NodeSet (org.ow2.proactive.utils.NodeSet)2 ImmutableSet (com.google.common.collect.ImmutableSet)1 TestNode (functionaltests.utils.TestNode)1 Path (java.nio.file.Path)1 Permission (java.security.Permission)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1 Set (java.util.Set)1 ActiveObjectCreationException (org.objectweb.proactive.ActiveObjectCreationException)1 NodeException (org.objectweb.proactive.core.node.NodeException)1 BooleanWrapper (org.objectweb.proactive.core.util.wrapper.BooleanWrapper)1 IdentityPrincipal (org.ow2.proactive.authentication.principals.IdentityPrincipal)1 UserNamePrincipal (org.ow2.proactive.authentication.principals.UserNamePrincipal)1 MethodCallPermission (org.ow2.proactive.permissions.MethodCallPermission)1 NodeState (org.ow2.proactive.resourcemanager.common.NodeState)1