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 + "\"");
}
Aggregations