Class semper.transfer.Security
All Packages Class Hierarchy This Package Previous Next Index
Class semper.transfer.Security
java.lang.Object
|
+----semper.transfer.Security
- public class Security
- extends Object
- implements Streamable
This class provides a wrapper for the security attributes of containers.
The attributes are kept in a boolean array and the class provides different
methods to get and set the elements of this array.
In the moment there are 6 different security attributes with indexes as follows:
- MESSAGE_CONFIDENTIALITY: 0
- MESSAGE_INTEGRITY: 1
- MESSAGE_AUTHENTICATION: 2
- ANONYMITY_BY_ALIAS: 3
- NON_REPUDIATON_OF_DELIVERY: 4
- NON_REPUDIATION_OF_RECEIPT: 5
-
ANONYMITY_BY_ALIAS
-
-
MESSAGE_AUTHENTICATION
-
-
MESSAGE_CONFIDENTIALITY
-
-
MESSAGE_INTEGRITY
-
-
NON_REPUDIATION_OF_RECEIPT
-
-
NON_REPUDIATON_OF_DELIVERY
-
-
SEC_ATTR_MAX
-
-
Security()
- Simple default Constructor.
-
Security(boolean[])
- Constructor with boolean array.
-
convert()
- Converts this object into a SecurityOptions Vector of the payment block.
-
copy()
- Clones a security object.
-
get(int)
- Test the specified attribute.
-
getAll()
- Gets an array with the boolean values of the attributes.
-
myStreamSize()
- Gets the streamsize of the object.
-
readObject(StreamInputInterface)
- Reads a security object from an input stream.
-
reset(int)
- Resets the specified attribute (sets them to false).
-
resetAll()
- Resets all security attributes (sets all to false).
-
set(int)
- Sets the specified attribute.
-
setAll()
- Sets all security attributes to true.
-
setMask(boolean[])
- Sets the security attributes like the given boolean array.
-
writeObject(StreamOutputInterface)
- Writes the object to an output stream.
SEC_ATTR_MAX
public final static int SEC_ATTR_MAX
MESSAGE_CONFIDENTIALITY
public final static int MESSAGE_CONFIDENTIALITY
MESSAGE_INTEGRITY
public final static int MESSAGE_INTEGRITY
MESSAGE_AUTHENTICATION
public final static int MESSAGE_AUTHENTICATION
ANONYMITY_BY_ALIAS
public final static int ANONYMITY_BY_ALIAS
NON_REPUDIATON_OF_DELIVERY
public final static int NON_REPUDIATON_OF_DELIVERY
NON_REPUDIATION_OF_RECEIPT
public final static int NON_REPUDIATION_OF_RECEIPT
Security
public Security()
- Simple default Constructor.
If this constructor is invoked all attributes are set to false.
Security
public Security(boolean SecAttributes[])
- Constructor with boolean array.
The corresponding attributes of array and object are set.
If there are less than SEC_ATTR_MAX array elements only the first security
attributes are set.
- Parameters:
- SecAttributes[] - describes the security attributes or features which are used
getAll
public boolean[] getAll()
- Gets an array with the boolean values of the attributes.
In the returned array the indexes given by the class constants are set or not
corresponding to the attributes in the security object.
- Returns:
- an array describing the security attributes or features which are used
get
public boolean get(int i)
- Test the specified attribute.
If the specified index is higher than SEC_ATTR_MAX false is returned
- Returns:
- the boolean value of a security attributes or features (true if it's set).
setMask
public void setMask(boolean SecAttributes[])
- Sets the security attributes like the given boolean array.
If there are less elements then security attributes, only the first security
attributes are concerned
- Parameters:
- SecAttributes[] - describes the security attributes or features which are used
setAll
public void setAll()
- Sets all security attributes to true.
set
public void set(int i)
- Sets the specified attribute.
- Parameters:
- i - the index of the attribute to be set
resetAll
public void resetAll()
- Resets all security attributes (sets all to false).
reset
public void reset(int i)
- Resets the specified attribute (sets them to false).
writeObject
public void writeObject(StreamOutputInterface stream) throws StreamIOException
- Writes the object to an output stream.
This method writes the data content of the object into a stream which can later
be read by the read method.
- Parameters:
- stream - the stream of data the object state is recorded in
- Throws: StreamIOException
- If a subobject does not implement the Streamable interface.
- See Also:
- StreamOutputInterface, TargetStream
readObject
public void readObject(StreamInputInterface stream) throws StreamIOException
- Reads a security object from an input stream.
Parameter StreamInputInterface
- Parameters:
- stream - the stream of data the object state is retrieved from
- Throws: StreamIOException
- If a class is not present or the input
data is corrupt
- See Also:
- StreamInputInterface, SourceStream
myStreamSize
public int myStreamSize()
- Gets the streamsize of the object.
- Returns:
- the size of the stream
copy
public Security copy()
- Clones a security object.
- Returns:
- a identical Object of the Class Security
convert
public Vector convert()
- Converts this object into a SecurityOptions Vector of the payment block.
The Options of the payment block do not fully correspondend with the
security attributes.
- Returns:
- a Vector with the Options of the payment block
All Packages Class Hierarchy This Package Previous Next Index