org.ssonet.net
Class PhaseTwoResult

java.lang.Object
  |
  +--org.ssonet.net.PhaseTwoResult
All Implemented Interfaces:
java.io.Serializable

public class PhaseTwoResult
extends java.lang.Object
implements java.io.Serializable

This class holds a security goal configuration after the security goal negotiation. For each security goal, it says, whether it shall be enforced or not.

See Also:
Serialized Form

Constructor Summary
PhaseTwoResult()
          Constructor for a new Settings object.
PhaseTwoResult(byte[] encoded)
          Create a new PhaseTwoResult from its encoded form.
PhaseTwoResult(org.w3c.dom.Element root)
          Creates a new PhaseTwoResult from an XML Document
 
Method Summary
 org.w3c.dom.Document asXMLDocument()
          Encodes the PhaseTwoResult into an XML Document
 byte[] getEncoded()
          Returns a PhaseTwoResult encoded to a byte array.
 int getSecurityGoalValue(int securityGoalConstant)
          Gets a value for a security goal.
 void setSecurityGoalValue(int securityGoalConstant, int value)
          Sets a value for a security goal.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PhaseTwoResult

public PhaseTwoResult()
Constructor for a new Settings object. By default, all security goals are set to SSONETConstants.YES .


PhaseTwoResult

public PhaseTwoResult(byte[] encoded)
               throws java.io.InvalidObjectException
Create a new PhaseTwoResult from its encoded form.

Parameters:
encoded - the configuration in its encoded form.

PhaseTwoResult

public PhaseTwoResult(org.w3c.dom.Element root)
               throws java.io.IOException
Creates a new PhaseTwoResult from an XML Document

Parameters:
root - the Element holding the PhaseTwoConfiguration
Throws:
java.io.IOException - if an error occures while decoding
Method Detail

setSecurityGoalValue

public void setSecurityGoalValue(int securityGoalConstant,
                                 int value)
Sets a value for a security goal. The security goal constants and values are defined in class SSONETConstants.

Parameters:
value - true, if the security goal shall be enforced, false otherwise
securityGoalConstant - the security goal constant from SSONETConstants
See Also:
SSONETConstants

getSecurityGoalValue

public int getSecurityGoalValue(int securityGoalConstant)
Gets a value for a security goal. The security goal constants and values are defined in class SSONETConstants.

Parameters:
securityGoalConstant - the security goal constant from SSONETConstants
Returns:
the security goal value
See Also:
SSONETConstants

getEncoded

public byte[] getEncoded()
Returns a PhaseTwoResult encoded to a byte array.

Returns:
a byte array holding the PhaseTwoResult in encoded form.

asXMLDocument

public org.w3c.dom.Document asXMLDocument()
Encodes the PhaseTwoResult into an XML Document

Returns:
the PhaseTwoResult encoded into an XML Document

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
the String representation of a PhaseTwoResult.


Copyright © 2003 DRIM Team. All Rights Reserved.