org.jppf.security
Class JPPFSecurityContext

java.lang.Object
  extended by org.jppf.security.JPPFSecurityContext
All Implemented Interfaces:
Serializable

public final class JPPFSecurityContext
extends Object
implements Serializable

This interface encapsulates the required information and behaviour to manage how a component (driver, node or client) interacts with the others, in terms of authorizations and clearance.

Organizations - or users or entities - willing to participate in a JPPF grid network must have an implementation of this interface provided with every component they send onto the network. If it is not present, any component of this organization should be denied access.

Author:
Laurent Cohen
See Also:
Serialized Form

Constructor Summary
JPPFSecurityContext(String uuid, String id, JPPFCredentials credentials)
          Create a JPPF signature witht he specified parameters.
 
Method Summary
 boolean canAdministrate(JPPFSecurityContext credentials)
          Determine whether the owner of these credentials can administrate an other entity on the network.
 boolean canExecute(JPPFSecurityContext credentials)
          Determine whether the owner of these credentials can execute tasks from another entity on the network.
 boolean canReceive(JPPFSecurityContext credentials)
          Determine whether the owner of these credentials can receive tasks from another entity on the network.
 boolean canSend(JPPFSecurityContext credentials)
          Determine whether the owner of these credentials can send tasks to another entity on the network.
 String getDomain()
          Get the security domain these credentials relate to.
 String getIdentifier()
          Get the identifier for these credentials' owner.
 JPPFCredentials getSignature()
          Get the signature for these credentials.
 String getUuid()
          Get the unique universal identifier of the component that owns these credentials.
 void setDomain(String domain)
          Set the security domain these credentials relate to.
 String toString()
          Get a string representation of this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JPPFSecurityContext

public JPPFSecurityContext(String uuid,
                           String id,
                           JPPFCredentials credentials)
Create a JPPF signature witht he specified parameters.

Parameters:
uuid - uuid for the owner of these credentials.
id - identifier for the owner of these credentials.
credentials - the signature associated with these credentials.
Method Detail

getUuid

public String getUuid()
Get the unique universal identifier of the component that owns these credentials.

Returns:
the uuid as a String.

getIdentifier

public String getIdentifier()
Get the identifier for these credentials' owner. It doesn't have to be universally unique, and is used to identify the entity that makes use of the framework. The entity can be an organization, user, software component, etc...

Returns:
the identifier as a String.

getSignature

public JPPFCredentials getSignature()
Get the signature for these credentials.

Returns:
a JPPFCredentials instance.

canExecute

public boolean canExecute(JPPFSecurityContext credentials)
Determine whether the owner of these credentials can execute tasks from another entity on the network.

Parameters:
credentials - the entity's security credentials.
Returns:
true if the owner can execute the entity's tasks, false otherwise.

canSend

public boolean canSend(JPPFSecurityContext credentials)
Determine whether the owner of these credentials can send tasks to another entity on the network.

Parameters:
credentials - the entity's security credentials.
Returns:
true if the owner can send tasks to the other entity, false otherwise.

canReceive

public boolean canReceive(JPPFSecurityContext credentials)
Determine whether the owner of these credentials can receive tasks from another entity on the network.

Parameters:
credentials - the entity's security credentials.
Returns:
true if the owner can receive tasks from the other entity, false otherwise.

canAdministrate

public boolean canAdministrate(JPPFSecurityContext credentials)
Determine whether the owner of these credentials can administrate an other entity on the network.

Parameters:
credentials - the entity's security credentials.
Returns:
true if the owner can administrate the other entity, false otherwise.

toString

public String toString()
Get a string representation of this instance.

Overrides:
toString in class Object
Returns:
a string displaying information about these credentials.
See Also:
Object.toString()

getDomain

public String getDomain()
Get the security domain these credentials relate to.

Returns:
the domain as a string.

setDomain

public void setDomain(String domain)
Set the security domain these credentials relate to.

Parameters:
domain - the domain as a string.


Copyright © 2005-2010 JPPF Team.