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:


Variable Index

 o ANONYMITY_BY_ALIAS
 o MESSAGE_AUTHENTICATION
 o MESSAGE_CONFIDENTIALITY
 o MESSAGE_INTEGRITY
 o NON_REPUDIATION_OF_RECEIPT
 o NON_REPUDIATON_OF_DELIVERY
 o SEC_ATTR_MAX

Constructor Index

 o Security()
Simple default Constructor.
 o Security(boolean[])
Constructor with boolean array.

Method Index

 o convert()
Converts this object into a SecurityOptions Vector of the payment block.
 o copy()
Clones a security object.
 o get(int)
Test the specified attribute.
 o getAll()
Gets an array with the boolean values of the attributes.
 o myStreamSize()
Gets the streamsize of the object.
 o readObject(StreamInputInterface)
Reads a security object from an input stream.
 o reset(int)
Resets the specified attribute (sets them to false).
 o resetAll()
Resets all security attributes (sets all to false).
 o set(int)
Sets the specified attribute.
 o setAll()
Sets all security attributes to true.
 o setMask(boolean[])
Sets the security attributes like the given boolean array.
 o writeObject(StreamOutputInterface)
Writes the object to an output stream.

Variables

 o SEC_ATTR_MAX
  public final static int SEC_ATTR_MAX
 o MESSAGE_CONFIDENTIALITY
  public final static int MESSAGE_CONFIDENTIALITY
 o MESSAGE_INTEGRITY
  public final static int MESSAGE_INTEGRITY
 o MESSAGE_AUTHENTICATION
  public final static int MESSAGE_AUTHENTICATION
 o ANONYMITY_BY_ALIAS
  public final static int ANONYMITY_BY_ALIAS
 o NON_REPUDIATON_OF_DELIVERY
  public final static int NON_REPUDIATON_OF_DELIVERY
 o NON_REPUDIATION_OF_RECEIPT
  public final static int NON_REPUDIATION_OF_RECEIPT

Constructors

 o Security
  public Security()
Simple default Constructor. If this constructor is invoked all attributes are set to false.
 o 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

Methods

 o 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
 o 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).
 o 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
 o setAll
  public void setAll()
Sets all security attributes to true.
 o set
  public void set(int i)
Sets the specified attribute.
Parameters:
i - the index of the attribute to be set
 o resetAll
  public void resetAll()
Resets all security attributes (sets all to false).
 o reset
  public void reset(int i)
Resets the specified attribute (sets them to false).
 o 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
 o 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
 o myStreamSize
  public int myStreamSize()
Gets the streamsize of the object.
Returns:
the size of the stream
 o copy
  public Security copy()
Clones a security object.
Returns:
a identical Object of the Class Security
 o 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