org.iids.aos.kernel
Class RoleBitmap

java.lang.Object
  extended by org.iids.aos.kernel.RoleBitmap

public class RoleBitmap
extends java.lang.Object

A role bitmap (role_t) in AOS V5 is 32 bits, ordered left to right. The rightmost (unused) bits are left 0.

Author:
arno

Field Summary
static java.lang.String APPMW_ROLE_NAME
           
static java.lang.String INIT_ROLE_NAME
          Two standard role names
static int NBITS
           
static java.lang.String ROLE_AC_ACCESS_ONLY
          Role for AC access only (no communication etc)
static java.lang.String ROLE_COMM_ONLY
          Role for communication only
 
Constructor Summary
RoleBitmap(int start, int end)
          Creates a new instance of RoleBitmap The bitmap will be initialized to a bitmap which has set the bits in the range start (inclusive) to end (exclusive).
RoleBitmap(java.lang.String marshalled)
           
 
Method Summary
 void clear(int bitIndex)
           
 boolean get(int bitIndex)
           
static RoleBitmap getDefault(java.lang.String RoleName)
           
 boolean isSet(java.lang.String methodName)
          Check if the bit for the given method is set
 java.lang.String marshall()
           
 void set(int bitIndex)
           
 void set(int bitIndex, boolean value)
           
 boolean strictSupersetOf(RoleBitmap subBitmap)
          Checks if the role bitmap is a strict superset
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NBITS

public static final int NBITS
See Also:
Constant Field Values

INIT_ROLE_NAME

public static final java.lang.String INIT_ROLE_NAME
Two standard role names

See Also:
Constant Field Values

APPMW_ROLE_NAME

public static final java.lang.String APPMW_ROLE_NAME
See Also:
Constant Field Values

ROLE_AC_ACCESS_ONLY

public static final java.lang.String ROLE_AC_ACCESS_ONLY
Role for AC access only (no communication etc)

See Also:
Constant Field Values

ROLE_COMM_ONLY

public static final java.lang.String ROLE_COMM_ONLY
Role for communication only

See Also:
Constant Field Values
Constructor Detail

RoleBitmap

public RoleBitmap(int start,
                  int end)
Creates a new instance of RoleBitmap The bitmap will be initialized to a bitmap which has set the bits in the range start (inclusive) to end (exclusive). The rest of the bits are unset. If start == end, then no bits will be set.


RoleBitmap

public RoleBitmap(java.lang.String marshalled)
Method Detail

getDefault

public static RoleBitmap getDefault(java.lang.String RoleName)
                             throws BadArgumentException
Throws:
BadArgumentException

strictSupersetOf

public boolean strictSupersetOf(RoleBitmap subBitmap)
Checks if the role bitmap is a strict superset

Parameters:
subBitmap - the subset bitmap
Returns:
whether true or not

isSet

public boolean isSet(java.lang.String methodName)
              throws BadArgumentException
Check if the bit for the given method is set

Parameters:
methodName - the simple name of the kernel primitive
Returns:
whether set or not
Throws:
BadArgumentException - if the methodName is not the name of a kernel primitive.

set

public void set(int bitIndex)
         throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

set

public void set(int bitIndex,
                boolean value)
         throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

clear

public void clear(int bitIndex)
           throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

get

public boolean get(int bitIndex)
            throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

marshall

public java.lang.String marshall()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003, 2004 IIDS Group. All Rights Reserved.