org.openxri.resolve
Class ResolverState

java.lang.Object
  extended by org.openxri.resolve.ResolverState

public class ResolverState
extends java.lang.Object

This class used to provide encapsulation of the cache state of a Resolver object. Now, it is used to store information about the references processed, URI traversed, etc. during a resolution request. The caching functionality may be revived at a later date.

Author:
=chetan, =wil

Nested Class Summary
 class ResolverState.ResolverStep
           
 
Constructor Summary
ResolverState()
          Constructor
 
Method Summary
 Cache getCache(boolean bTrusted)
          Deprecated.  
 int getNumBytesReceived()
           
 int getNumRefsFollowed()
           
 int getNumRequests()
           
 int getNumSteps()
           
 ResolverState.ResolverStep getStepAt(int i)
           
 long getTimeStarted()
           
 void pushFollowingRef(XRI ref)
           
 void pushResolved(java.lang.String qxri, java.lang.String trustType, java.lang.String xrds, java.net.URI uri)
           
 void reset(XRIAuthority oAuth)
          Resets the internal XRD cache for this XRIAuthority
 void set(XRIAuthority oAuth, XRD oDesc)
          Deprecated.  
 void setAtAuthority(XRD oDesc)
          Deprecated.  
 void setEqualsAuthority(XRD oDesc)
          Sets the XRD for the "=" Authority.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResolverState

public ResolverState()
Constructor

Method Detail

getTimeStarted

public long getTimeStarted()
Returns:
Returns the time that this object was constructed.

getNumRefsFollowed

public int getNumRefsFollowed()
Returns:
Returns the number of Refs followed.

getNumRequests

public int getNumRequests()
Returns:
Returns the number of resolution requests attempted

getNumBytesReceived

public int getNumBytesReceived()
Returns:
Returns the total size of XRDS's received.

getStepAt

public ResolverState.ResolverStep getStepAt(int i)

getNumSteps

public int getNumSteps()

pushResolved

public void pushResolved(java.lang.String qxri,
                         java.lang.String trustType,
                         java.lang.String xrds,
                         java.net.URI uri)
Parameters:
qxri - QXRI that was resolved
xrds - XRDS document received
uri - URI queried to resolve the QXRI

pushFollowingRef

public void pushFollowingRef(XRI ref)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getCache

public Cache getCache(boolean bTrusted)
Deprecated. 

Returns the Cache object for the security model

Parameters:
bTrusted - if true, returns the trusted cache, if false, returns the regular cache.

set

public void set(XRIAuthority oAuth,
                XRD oDesc)
Deprecated. 

Sets the XRD for the final subsegment of the XRIAuthority. The authority may contain multiple subgments. Each internal subsegment will not be set.

Parameters:
oAuth - The XRIAuthority element to set
oDesc - The descriptor for the final subsegment in the oAuth

reset

public void reset(XRIAuthority oAuth)
Resets the internal XRD cache for this XRIAuthority

Parameters:
oAuth - The XRIAuthority element to prune

setAtAuthority

public void setAtAuthority(XRD oDesc)
Deprecated. 

Sets the XRD for the "@" Authority.

Parameters:
oDesc - The descriptor for the "@" Authority

setEqualsAuthority

public void setEqualsAuthority(XRD oDesc)
Sets the XRD for the "=" Authority.

Parameters:
oDesc - The descriptor for the "=" Authority


Copyright © 2005-2012. All Rights Reserved.