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.

    • 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

      • isTpcRequest

        public boolean isTpcRequest()
      • 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()
      • getSourceToken

        public java.lang.String getSourceToken()
      • getExternal

        public java.lang.String getExternal()
      • getFd

        public int getFd()
      • getGid

        public java.lang.Long getGid()
      • getKey

        public java.lang.String getKey()
      • getLfn

        public java.lang.String getLfn()
      • getLoginToken

        public java.lang.String getLoginToken()
      • getSrc

        public java.lang.String getSrc()
      • getSrcHost

        public java.lang.String getSrcHost()
      • getSrcPort

        public java.lang.Integer getSrcPort()
      • getUid

        public java.lang.Long getUid()
      • getDlgon

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

        public void setUid​(java.lang.Long uid)
      • setGid

        public void setGid​(java.lang.Long gid)
      • setDelegatedProxy

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

        public void setFileStatus​(FileStatus fileStatus)
      • setFd

        public void setFd​(int fd)
      • getSourceURL

        public java.net.URI getSourceURL​(java.lang.String destinationPath)
        The source URL if the TPC request targets the destination server.
        Parameters:
        destinationPath - The path of the file on the destination server.
        Returns:
        The URL of the source.
        Throws:
        java.lang.IllegalStateException - if tpc.src is not defined.