org.openxri.pipeline.stages
Class AddAuthorityResolutionSEPStage
java.lang.Object
org.openxri.pipeline.stages.AbstractStage
org.openxri.pipeline.stages.AddAuthorityResolutionSEPStage
- All Implemented Interfaces:
- java.io.Serializable, Stage
public class AddAuthorityResolutionSEPStage
- extends AbstractStage
A stage that adds an authority resolution service endpoint to the XRD. It uses the server's URIMapper to
appropriately construct the URI. It is recommended to put this stage into the LOOKUP pipeline, so that
community i-names can be resolved to an arbitrary depth.
Parameters for the stage's configuration:
http (optional, default: true):
Set to true, if a HTTP endpoint URI should be added to the service endpoint.
https (optional, default: true):
Set to true, if a HTTPS endpoint URI should be added to the service endpoint.
httpport (optional, default: 80):
The TCP port of the HTTP endpoint URI
httpsport (optional, default: 443):
The TCP port of the HTTPS endpoint URI
trust (optional, default: none):
The trust type to use for the service endpoint's media type element.
check-children (optional, default: true):
If this is true, then the authority resolution SEP will only be added if the
authority actually has child subsegments.
Recommended pipeline(s) for this stage:
LOOKUP
- Author:
- =peacekeeper
- See Also:
- Serialized Form
Method Summary |
XRD |
execute(Store store,
XRD xrd,
XRISegment segment,
Authority parentAuthority,
java.lang.String subSegmentName,
Authority authority,
boolean isCreate)
Called as part of executing a pipeline. |
void |
init()
A stage is constructed by the PipelineRegistry by passing a Properties object
to its constructor and then calling this init() method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTIES_KEY_HTTP
public static final java.lang.String PROPERTIES_KEY_HTTP
- See Also:
- Constant Field Values
PROPERTIES_KEY_HTTPS
public static final java.lang.String PROPERTIES_KEY_HTTPS
- See Also:
- Constant Field Values
PROPERTIES_KEY_HTTPPORT
public static final java.lang.String PROPERTIES_KEY_HTTPPORT
- See Also:
- Constant Field Values
PROPERTIES_KEY_HTTPSPORT
public static final java.lang.String PROPERTIES_KEY_HTTPSPORT
- See Also:
- Constant Field Values
PROPERTIES_KEY_TRUST
public static final java.lang.String PROPERTIES_KEY_TRUST
- See Also:
- Constant Field Values
PROPERTIES_KEY_CHECK_CHILDREN
public static final java.lang.String PROPERTIES_KEY_CHECK_CHILDREN
- See Also:
- Constant Field Values
DEFAULT_HTTP
public static final java.lang.String DEFAULT_HTTP
- See Also:
- Constant Field Values
DEFAULT_HTTPS
public static final java.lang.String DEFAULT_HTTPS
- See Also:
- Constant Field Values
DEFAULT_HTTPPORT
public static final java.lang.String DEFAULT_HTTPPORT
- See Also:
- Constant Field Values
DEFAULT_HTTPSPORT
public static final java.lang.String DEFAULT_HTTPSPORT
- See Also:
- Constant Field Values
DEFAULT_TRUST
public static final java.lang.String DEFAULT_TRUST
- See Also:
- Constant Field Values
DEFAULT_CHECK_CHILDREN
public static final java.lang.String DEFAULT_CHECK_CHILDREN
- See Also:
- Constant Field Values
AddAuthorityResolutionSEPStage
public AddAuthorityResolutionSEPStage(java.util.Properties properties)
init
public void init()
throws java.lang.Exception
- Description copied from interface:
Stage
- A stage is constructed by the PipelineRegistry by passing a Properties object
to its constructor and then calling this init() method.
- Throws:
java.lang.Exception
execute
public XRD execute(Store store,
XRD xrd,
XRISegment segment,
Authority parentAuthority,
java.lang.String subSegmentName,
Authority authority,
boolean isCreate)
throws StageException
- Description copied from interface:
Stage
- Called as part of executing a pipeline.
- Parameters:
store
- The store from which the authorities were retrieved.xrd
- A XRD as it currently looks like on the pipeline. The stage is free to modify and return it in any way.segment
- The XRI segment that resolves to the XRD being processed.parentAuthority
- The parent authority, i.e. the authority describing the XRD.subSegmentName
- The name of the subsegment that connects the two authorities.authority
- The authority, i.e. the authority described by the XRD.isCreate
- Whether this stage is execute as part of a CREATE pipeline.
- Returns:
- The XRD that is passed on to the next stage of the pipeline.
- Throws:
StageException
Copyright © 2005-2012. All Rights Reserved.