Package jcifs.internal.dfs
Class DfsReferralDataImpl
- java.lang.Object
-
- jcifs.internal.dfs.DfsReferralDataImpl
-
- All Implemented Interfaces:
DfsReferralData
,DfsReferralDataInternal
public class DfsReferralDataImpl extends Object implements DfsReferralDataInternal
- Author:
- mbechler
-
-
Constructor Summary
Constructors Constructor Description DfsReferralDataImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(DfsReferralDataInternal dr)
DfsReferralDataInternal
combine(DfsReferralData n)
boolean
equals(Object obj)
void
fixupDomain(String dom)
Possibly appends the given domain name to the host name if it is currently unqualifiedvoid
fixupHost(String fqdn)
Replaces the host with the given FQDN if it is currently unqualifiedstatic DfsReferralDataImpl
fromReferral(Referral ref, String reqPath, long expire, int consumed)
String
getDomain()
long
getExpiration()
int
getFlags()
String
getKey()
String
getLink()
String
getPath()
int
getPathConsumed()
String
getServer()
String
getShare()
long
getTtl()
int
hashCode()
void
intermediate()
boolean
isIntermediate()
boolean
isResolveHashes()
Not exactly sure what that is all about, certainly legacy stuffDfsReferralDataImpl
next()
void
replaceCache()
Replaces the entry with key in the cache map with this referralvoid
setCacheMap(Map<String,DfsReferralDataInternal> map)
void
setDomain(String domain)
void
setKey(String key)
void
setLink(String link)
void
stripPathConsumed(int i)
Reduces path consumed by the given valueString
toString()
<T extends DfsReferralData>
Tunwrap(Class<T> type)
-
-
-
Method Detail
-
unwrap
public <T extends DfsReferralData> T unwrap(Class<T> type)
- Specified by:
unwrap
in interfaceDfsReferralData
- Returns:
- the referral adapted to type
- See Also:
DfsReferralData.unwrap(java.lang.Class)
-
getExpiration
public long getExpiration()
- Specified by:
getExpiration
in interfaceDfsReferralData
- Returns:
- the expiration time of this entry
-
getPathConsumed
public int getPathConsumed()
- Specified by:
getPathConsumed
in interfaceDfsReferralData
- Returns:
- the number of characters from the unc path that were consumed by this referral
-
getDomain
public String getDomain()
- Specified by:
getDomain
in interfaceDfsReferralData
- Returns:
- the domain this referral is for
- See Also:
DfsReferralData.getDomain()
-
setDomain
public void setDomain(String domain)
- Parameters:
domain
- the domain to set
-
getLink
public String getLink()
- Specified by:
getLink
in interfaceDfsReferralData
- Returns:
- the link
-
setLink
public void setLink(String link)
- Specified by:
setLink
in interfaceDfsReferralDataInternal
-
getKey
public String getKey()
- Specified by:
getKey
in interfaceDfsReferralDataInternal
- Returns:
- the key
-
setKey
public void setKey(String key)
- Specified by:
setKey
in interfaceDfsReferralDataInternal
- Parameters:
key
- the key to set
-
getServer
public String getServer()
- Specified by:
getServer
in interfaceDfsReferralData
- Returns:
- the server this referral points to
-
getShare
public String getShare()
- Specified by:
getShare
in interfaceDfsReferralData
- Returns:
- the share this referral points to
-
getPath
public String getPath()
- Specified by:
getPath
in interfaceDfsReferralData
- Returns:
- the replacement path for this referal
-
getFlags
public int getFlags()
- Returns:
- the rflags
-
setCacheMap
public void setCacheMap(Map<String,DfsReferralDataInternal> map)
- Specified by:
setCacheMap
in interfaceDfsReferralDataInternal
- See Also:
DfsReferralDataInternal.setCacheMap(java.util.Map)
-
replaceCache
public void replaceCache()
Replaces the entry with key in the cache map with this referral- Specified by:
replaceCache
in interfaceDfsReferralDataInternal
- See Also:
DfsReferralDataInternal.replaceCache()
-
next
public DfsReferralDataImpl next()
- Specified by:
next
in interfaceDfsReferralData
- Specified by:
next
in interfaceDfsReferralDataInternal
- Returns:
- pointer to next referral, points to self if there is no further referral
-
append
public void append(DfsReferralDataInternal dr)
- Specified by:
append
in interfaceDfsReferralDataInternal
- Parameters:
dr
-
-
stripPathConsumed
public void stripPathConsumed(int i)
Reduces path consumed by the given value- Specified by:
stripPathConsumed
in interfaceDfsReferralDataInternal
- See Also:
DfsReferralDataInternal.stripPathConsumed(int)
-
fixupDomain
public void fixupDomain(String dom)
Description copied from interface:DfsReferralDataInternal
Possibly appends the given domain name to the host name if it is currently unqualified- Specified by:
fixupDomain
in interfaceDfsReferralDataInternal
-
fixupHost
public void fixupHost(String fqdn)
Description copied from interface:DfsReferralDataInternal
Replaces the host with the given FQDN if it is currently unqualified- Specified by:
fixupHost
in interfaceDfsReferralDataInternal
-
isResolveHashes
public boolean isResolveHashes()
Description copied from interface:DfsReferralDataInternal
Not exactly sure what that is all about, certainly legacy stuff- Specified by:
isResolveHashes
in interfaceDfsReferralDataInternal
- Returns:
- the resolveHashes
-
intermediate
public void intermediate()
-
isIntermediate
public boolean isIntermediate()
- Specified by:
isIntermediate
in interfaceDfsReferralDataInternal
- Returns:
- the intermediate
-
getTtl
public long getTtl()
- Returns:
- the ttl
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classObject
- See Also:
Object.equals(java.lang.Object)
-
fromReferral
public static DfsReferralDataImpl fromReferral(Referral ref, String reqPath, long expire, int consumed)
- Parameters:
ref
-reqPath
-expire
-consumed
-- Returns:
- referral data
-
combine
public DfsReferralDataInternal combine(DfsReferralData n)
- Specified by:
combine
in interfaceDfsReferralDataInternal
- Returns:
- new referral, combining a chain of referrals
- See Also:
DfsReferralDataInternal.combine(jcifs.DfsReferralData)
-
-