Class XrootdTpcInfo


  • public class XrootdTpcInfo
    extends java.lang.Object

    Metadata established via interaction between user client, source and destination in a third-party copy, occurring prior to the launching of an internal third-party copy operation.

    Used to verify and coordinate the open and close requests.

    • Field Detail

      • STAGE

        public static final java.lang.String STAGE

        Opaque string name-value keys.

        See Also:
        Constant Field Values
      • SPR

        public static final java.lang.String SPR
        This protocol should be used in conjunction with server-side settings to determine whether the TPC client should use TLS (= 'xroots').
        See Also:
        Constant Field Values
      • SCGI

        public static final java.lang.String SCGI
        This is the scgi added for delegation purposes.

        From the SLAC documentation:

        The CGI information from the source URL. This element needs to be specified only if a) delegation is being used and b) meaningful CGI is present on the source URL (see the notes on the definition of meaningful). Since a CGI string may not be the value of a CGI element, all ampersands in scgi should be converted to tab characters. The destination server is responsible for converting the tabs to ampersands before initiating the copy.

        See Also:
        Constant Field Values
      • PLACEMENT

        public static final java.lang.String PLACEMENT

        Opaque string name-value constant values.

        See Also:
        Constant Field Values
    • Constructor Detail

      • XrootdTpcInfo

        public XrootdTpcInfo​(java.lang.String key)
      • XrootdTpcInfo

        public XrootdTpcInfo​(java.util.Map<java.lang.String,​java.lang.String> opaque)
                      throws ParseException

        Initializes everything from the map instance. Calling this constructor implies a READY status.

        Ttl is not relevant.
        Throws:
        ParseException
    • Method Detail

      • addInfoFromOpaque

        public XrootdTpcInfo addInfoFromOpaque​(java.lang.String slfn,
                                               java.util.Map<java.lang.String,​java.lang.String> opaque)
                                        throws ParseException

        Used in a two-phase sequence (client, server), to add information incrementally.

        Will not overwrite existing non-null values.

        Throws:
        ParseException
      • copyForRedirect

        public XrootdTpcInfo copyForRedirect​(InboundRedirectResponse response)
                                      throws ParseException

        Saves relevant fields which should remain the same, and constructs new source endpoint info.

        Parameters:
        response - received from source.
        Returns:
        new info object which can be used to instantiate new client.
        Throws:
        ParseException
      • isTls

        public boolean isTls()
      • verify

        public XrootdTpcInfo.Status verify​(java.lang.String dst,
                                           java.lang.String slfn,
                                           java.lang.String org)
      • toString

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

        public boolean isExpired()
      • getCks

        public java.lang.String getCks()
      • getCreatedTime

        public long getCreatedTime()
      • getDelegatedProxy

        public java.io.Serializable getDelegatedProxy()
      • getDlgon

        public org.dcache.xrootd.tpc.XrootdTpcInfo.Delegation getDlgon()
      • getSourceToken

        public java.lang.String getSourceToken()
      • getExternal

        public java.lang.String getExternal()
      • getDst

        public java.lang.String getDst()
      • getFd

        public int getFd()
      • getKey

        public java.lang.String getKey()
      • getLfn

        public java.lang.String getLfn()
      • getLoginToken

        public java.lang.String getLoginToken()
      • getOrg

        public java.lang.String getOrg()
      • getSrc

        public java.lang.String getSrc()
      • getSrcHost

        public java.lang.String getSrcHost()
      • getSrcPort

        public java.lang.Integer getSrcPort()
      • getTtl

        public java.lang.Long getTtl()
      • setAsize

        public void setAsize​(long asize)
      • setCks

        public void setCks​(java.lang.String cks)
      • setDelegatedProxy

        public void setDelegatedProxy​(java.io.Serializable delegatedProxy)
      • setDst

        public void setDst​(java.lang.String dst)
      • setFileStatus

        public void setFileStatus​(FileStatus fileStatus)
      • setFd

        public void setFd​(int fd)
      • setLfn

        public void setLfn​(java.lang.String lfn)
      • setLoginToken

        public void setLoginToken​(java.lang.String loginToken)
      • setOrg

        public void setOrg​(java.lang.String org)
      • setSrc

        public void setSrc​(java.lang.String src)
      • setSrcHost

        public void setSrcHost​(java.lang.String srcHost)
      • setSrcPort

        public void setSrcPort​(java.lang.Integer srcPort)
      • setTtl

        public void setTtl​(java.lang.Long ttl)