Top Description Fields Constructors Methods
org.osgi.service.clusterinfo

public final Class ClusterTagPermission

Additional top-level class in compilation unit: ClusterTagPermissionCollection.

extends Permission
Class Inheritance
Imports
java.io.IOException, .ObjectInputStream, .ObjectOutputStream, .ObjectStreamField, java.security.Permission, .PermissionCollection, java.util.ArrayList, .Collections, .Enumeration, .HashMap, .List, .Map

A bundle's authority to add a tag to a NodeStatus service.

Field Summary

Modifier and TypeField and Description
private static final int
ACTION_ADD

The add action mask

private static final int
private transient int
action_mask

The actions mask.

pack-priv static final int
private volatile String
actions

The actions in canonical form.

public static final String
ADD

The action string add.

private transient volatile boolean
all

If the name is "*".

private static final long

Constructor Summary

AccessConstructor and Description
public
ClusterTagPermission(String
Give permission to add this tag, use * wildcard to give permission to add any tag.
tag
,
String
add.
actions
)

Defines the authority to add a tag to the NodeStatus service.

pack-priv
ClusterTagPermission(String
Tag name
name
,
int
action mask
mask
)

Package private constructor used by ClusterTagPermissionCollection.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if obj is a ClusterTagPermission, and has the same tag as this ClusterTagPermission object; false otherwise.
equals
(Object
The object to test for equality with this ClusterTagPermission object.
obj
)

Implements abstract java.security.Permission.equals.

Determines the equality of two ClusterTagPermission objects.

public String

Returns:

Canonical string representation of the ClusterTagPermission actions.
getActions
()

Implements abstract java.security.Permission.getActions.

Returns the canonical string representation of the ClusterTagPermission action.

pack-priv synchronized int

Returns:

Current action mask.
getActionsMask
()

Returns the current action mask.

public int

Returns:

A hash code value for this object.
hashCode
()

Implements abstract java.security.Permission.hashCode.

Returns the hash code value for this object.

public boolean

Returns:

true if the specified ClusterTagPermission action is implied by this object; false otherwise.
implies
(Permission
The target permission to interrogate.
p
)

Implements abstract java.security.Permission.implies.

Determines if the specified permission is implied by this object.

public PermissionCollection

Returns:

A new PermissionCollection object.
newPermissionCollection
()

Overrides java.security.Permission.newPermissionCollection.

Returns a new PermissionCollection object suitable for storing ClusterTagPermission objects.

private static int

Returns:

action mask.
parseActions
(final String
Action string.
actions
)

Parse action string into action mask.

private synchronized void
readObject(ObjectInputStream s)

readObject is called to restore the state of this permission from a stream.

private synchronized void
setTransients(final int
action mask
mask
)

Called by constructors and when deserialized.

private synchronized void
writeObject(ObjectOutputStream s)

WriteObject is called to save the state of this permission object to a stream.

Inherited from java.security.Permission:
checkGuardgetNametoString

Field Detail

ACTION_ADDback to summary
private static final int ACTION_ADD

The add action mask

ACTION_ALLback to summary
private static final int ACTION_ALL
action_maskback to summary
private transient int action_mask

The actions mask.

ACTION_NONEback to summary
pack-priv static final int ACTION_NONE
actionsback to summary
private volatile String actions

The actions in canonical form.

ADDback to summary
public static final String ADD

The action string add.

allback to summary
private transient volatile boolean all

If the name is "*".

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.Permission.serialVersionUID.

Constructor Detail

ClusterTagPermissionback to summary
public ClusterTagPermission(String tag, String actions)

Defines the authority to add a tag to the NodeStatus service.

Parameters
tag:String

Give permission to add this tag, use * wildcard to give permission to add any tag.

actions:String

add.

ClusterTagPermissionback to summary
pack-priv ClusterTagPermission(String name, int mask)

Package private constructor used by ClusterTagPermissionCollection.

Parameters
name:String

Tag name

mask:int

action mask

Method Detail

equalsback to summary
public boolean equals(Object obj)

Implements abstract java.security.Permission.equals.

Determines the equality of two ClusterTagPermission objects. This method checks that specified ClusterTagPermission has the same tag as this ClusterTagPermission object.

Parameters
obj:Object

The object to test for equality with this ClusterTagPermission object.

Returns:boolean

true if obj is a ClusterTagPermission, and has the same tag as this ClusterTagPermission object; false otherwise.

Annotations
@Override
getActionsback to summary
public String getActions()

Implements abstract java.security.Permission.getActions.

Returns the canonical string representation of the ClusterTagPermission action.

Always returns the ADD action.

Returns:String

Canonical string representation of the ClusterTagPermission actions.

Annotations
@Override
getActionsMaskback to summary
pack-priv synchronized int getActionsMask()

Returns the current action mask.

Used by the ClusterTagPermissionCollection class.

Returns:int

Current action mask.

hashCodeback to summary
public int hashCode()

Implements abstract java.security.Permission.hashCode.

Returns the hash code value for this object.

Returns:int

A hash code value for this object.

Annotations
@Override
impliesback to summary
public boolean implies(Permission p)

Implements abstract java.security.Permission.implies.

Determines if the specified permission is implied by this object.

This method checks that the tag of the target is implied by the tag name of this object.

Parameters
p:Permission

The target permission to interrogate.

Returns:boolean

true if the specified ClusterTagPermission action is implied by this object; false otherwise.

Annotations
@Override
newPermissionCollectionback to summary
public PermissionCollection newPermissionCollection()

Overrides java.security.Permission.newPermissionCollection.

Returns a new PermissionCollection object suitable for storing ClusterTagPermission objects.

Returns:PermissionCollection

A new PermissionCollection object.

Annotations
@Override
parseActionsback to summary
private static int parseActions(final String actions)

Parse action string into action mask.

Parameters
actions:String

Action string.

Returns:int

action mask.

readObjectback to summary
private synchronized void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException

readObject is called to restore the state of this permission from a stream.

setTransientsback to summary
private synchronized void setTransients(final int mask)

Called by constructors and when deserialized.

Parameters
mask:int

action mask

writeObjectback to summary
private synchronized void writeObject(ObjectOutputStream s) throws IOException

WriteObject is called to save the state of this permission object to a stream. The actions are serialized, and the superclass takes care of the name.