public abstract class MessageTrustDecider extends Object
Each MessageTrustDecider has a "logical" name that may be used in logging to help ensure the proper trust decision is being made for particular conduits.
Modifier and Type | Field and Description |
---|---|
protected String |
logicalName
This field contains the "logical" name of this Message Trust Decider.
|
Modifier | Constructor and Description |
---|---|
protected |
MessageTrustDecider()
This default constructor sets the "logical" name of the trust
decider to be its class name.
|
protected |
MessageTrustDecider(String name)
This constructor is used to set the logical name of the
trust decider.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
establishTrust(String conduitName,
URLConnectionInfo connectionInfo,
Message message)
This method is called when a Message is about to be sent out
over an HTTPConduit.
|
String |
getLogicalName()
This method returns the logical name of this trust decider.
|
protected String logicalName
protected MessageTrustDecider()
protected MessageTrustDecider(String name)
public String getLogicalName()
public abstract void establishTrust(String conduitName, URLConnectionInfo connectionInfo, Message message) throws UntrustedURLConnectionIOException
It is important to note that the Message structure at this point may not have any content, so any analysis of message content may be impossible.
This method gets invoked after URL.setRequestProperties() is called on the URL for the selected protocol.
The HTTPConduit calls this message on every redirect, however, it is impossible to tell where it has been redirected from. TODO: What are the exising Message Properties at the point of this call?
conduitName
- This parameter contains the logical name
for the conduit that this trust decider
is being called from.connectionInfo
- This parameter contains information about
the URL Connection. It may be subclassed depending
on the protocol used for the URL. For "https",
this argument will be a HttpsURLConnectionInfo.
For "http", this argument will be
HttpURLConnectionInfo.message
- This parameter contains the Message structure
that governs where the message may be going.UntrustedURLConnectionIOException
- The trust decider throws this exception if
trust in the URLConnection cannot be established
for the particular Message.HttpURLConnectionInfo
,
HttpsURLConnectionInfo
Apache CXF