|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiscovery.DiscoResponse
public class DiscoResponse
The class DiscoResponse is used to create the reponse message. It needs to create the header and the body. The body contains the offerings or an status code indicating error. This also creates the tokens and a signature of the assertion.
Field Summary | |
---|---|
private java.security.cert.X509Certificate |
cert
|
private static java.lang.String |
disco
|
private static java.lang.String |
ds
|
private javax.xml.soap.SOAPEnvelope |
env
|
private java.lang.String |
issuerid
|
private static java.lang.String |
keystoreFile
|
private javax.xml.soap.SOAPMessage |
message
|
private ResourceOffering[] |
offerings
|
private java.security.PrivateKey |
privateKey
|
private DiscoQuery |
query
|
private static java.lang.String |
saml
|
static java.lang.String |
STATUS_FAILED
|
static java.lang.String |
STATUS_OK
|
private java.lang.String |
statusCode
|
private static int |
TIME_TO_LIVE
|
Constructor Summary | |
---|---|
DiscoResponse(DiscoQuery query,
ResourceOffering[] offerings,
java.lang.String statusCode)
The constructor creates the message and initialises variables that are used in message creation. |
Method Summary | |
---|---|
private void |
addOfferings(javax.xml.soap.SOAPElement queryResponse)
This appends the offerings to the response element by calling a method in ResourceOffering which adds offerings (stored in a Node) to a SOAPElement. |
private void |
createBody()
When creating the body the method adds the status element and an element which holds the content of the response. |
private void |
createHeaders()
This method creates the header by adding all the required fields such as the correlation and timestamp. |
private void |
createSignature(javax.xml.soap.SOAPElement assertion)
This method signs an authorisation assertion without the signature element and adds the signature to the assertion. |
private void |
createTokens(javax.xml.soap.SOAPElement queryResponse)
This method creates an authorisation assertion for each resource offering returned. |
private java.lang.String |
prepareAssertion(java.lang.String assertion)
This method removes line breaks to make the assertion similar at all times when using it for signing and signature verification. |
private void |
setStatusFailed()
Used to set the status code of this message to failed if something went wrong during the message creation. |
java.lang.String |
toString()
Returns a string representation of this request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STATUS_OK
public static final java.lang.String STATUS_FAILED
private static final java.lang.String disco
private static final java.lang.String saml
private static final java.lang.String ds
private static final int TIME_TO_LIVE
private static final java.lang.String keystoreFile
private DiscoQuery query
private java.security.PrivateKey privateKey
private ResourceOffering[] offerings
private java.lang.String statusCode
private java.lang.String issuerid
private javax.xml.soap.SOAPMessage message
private javax.xml.soap.SOAPEnvelope env
private java.security.cert.X509Certificate cert
Constructor Detail |
---|
public DiscoResponse(DiscoQuery query, ResourceOffering[] offerings, java.lang.String statusCode)
query
- DiscoQuery The request message related to this responseofferings
- ResourceOffering[] The offerings that was found for this userstatusCode
- String The status code which indicates the type of message to be sentMethod Detail |
---|
private void setStatusFailed()
private void createHeaders() throws javax.xml.soap.SOAPException
javax.xml.soap.SOAPException
private void createBody() throws javax.xml.soap.SOAPException, java.security.GeneralSecurityException
javax.xml.soap.SOAPException
java.security.GeneralSecurityException
private void addOfferings(javax.xml.soap.SOAPElement queryResponse) throws javax.xml.soap.SOAPException
javax.xml.soap.SOAPException
private void createTokens(javax.xml.soap.SOAPElement queryResponse) throws javax.xml.soap.SOAPException, java.security.GeneralSecurityException
javax.xml.soap.SOAPException
java.security.GeneralSecurityException
private java.lang.String prepareAssertion(java.lang.String assertion)
private void createSignature(javax.xml.soap.SOAPElement assertion) throws javax.xml.soap.SOAPException, java.security.GeneralSecurityException
javax.xml.soap.SOAPException
java.security.GeneralSecurityException
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |