/** * Retrieve the hostname of the server for this SMB resource. If this * <code>SmbFile</code> references a workgroup, the name of the workgroup * is returned. If this <code>SmbFile</code> refers to the root of this * SMB network hierarchy, <code>null</code> is returned. * * @return The server or workgroup name or <code>null</code> if this * <code>SmbFile</code> refers to the root <code>smb://</code> resource. */ public String getServer () { return this.fileLocator.getServer(); }
if ( tc.getDfs().isTrustedDomain(tc, locator.getServer()) ) {
/** * Retrieve the hostname of the server for this SMB resource. If this * <code>SmbFile</code> references a workgroup, the name of the workgroup * is returned. If this <code>SmbFile</code> refers to the root of this * SMB network hierarchy, <code>null</code> is returned. * * @return The server or workgroup name or <code>null</code> if this * <code>SmbFile</code> refers to the root <code>smb://</code> resource. */ public String getServer () { return this.fileLocator.getServer(); }
if ( tc.getDfs().isTrustedDomain(tc, locator.getServer()) ) {
/** * {@inheritDoc} * * @see jcifs.SmbResourceLocator#getServerWithDfs() */ @Override public String getServerWithDfs () { if ( this.dfsReferral != null ) { return this.dfsReferral.getServer(); } return getServer(); }
/** * {@inheritDoc} * * @see jcifs.SmbResourceLocator#getServerWithDfs() */ @Override public String getServerWithDfs () { if ( this.dfsReferral != null ) { return this.dfsReferral.getServer(); } return getServer(); }
/** * {@inheritDoc} * * @see java.lang.Object#hashCode() */ @Override public int hashCode () { int hash; try { hash = getAddress().hashCode(); } catch ( CIFSException uhe ) { hash = getServer().toUpperCase().hashCode(); } return hash + getURLPath().toUpperCase().hashCode(); }
/** * {@inheritDoc} * * @see java.lang.Object#hashCode() */ @Override public int hashCode () { int hash; try { hash = getAddress().hashCode(); } catch ( CIFSException uhe ) { hash = getServer().toUpperCase().hashCode(); } return hash + getURLPath().toUpperCase().hashCode(); }
/** * {@inheritDoc} * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals ( Object obj ) { if ( ! ( obj instanceof SmbResourceLocatorImpl ) ) { return false; } SmbResourceLocatorImpl o = (SmbResourceLocatorImpl) obj; /* * If uncertain, pathNamesPossiblyEqual returns true. * Comparing canonical paths is definitive. */ if ( pathNamesPossiblyEqual(this.url.getPath(), o.url.getPath()) ) { if ( getURLPath().equalsIgnoreCase(o.getURLPath()) ) { try { return getAddress().equals(o.getAddress()); } catch ( CIFSException uhe ) { log.debug("Unknown host", uhe); return getServer().equalsIgnoreCase(o.getServer()); } } } return false; }
/** * {@inheritDoc} * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals ( Object obj ) { if ( ! ( obj instanceof SmbResourceLocatorImpl ) ) { return false; } SmbResourceLocatorImpl o = (SmbResourceLocatorImpl) obj; /* * If uncertain, pathNamesPossiblyEqual returns true. * Comparing canonical paths is definitive. */ if ( pathNamesPossiblyEqual(this.url.getPath(), o.url.getPath()) ) { if ( getURLPath().equalsIgnoreCase(o.getURLPath()) ) { try { return getAddress().equals(o.getAddress()); } catch ( CIFSException uhe ) { log.debug("Unknown host", uhe); return getServer().equalsIgnoreCase(o.getServer()); } } } return false; }
String savedFullPath = rpath != null ? rpath.getFullUNCPath() : null; String fullPath = "\\" + loc.getServer() + "\\" + loc.getShare() + loc.getUNCPath(); int maxRetries = this.ctx.getConfig().getMaxRequestRetries(); for ( int retries = 1; retries <= maxRetries; retries++ ) {
String savedFullPath = rpath != null ? rpath.getFullUNCPath() : null; String fullPath = "\\" + loc.getServer() + "\\" + loc.getShare() + loc.getUNCPath(); int maxRetries = this.ctx.getConfig().getMaxRequestRetries(); for ( int retries = 1; retries <= maxRetries; retries++ ) {
String rfullpath = request != null ? request.getFullUNCPath() : ( '\\' + loc.getServer() + '\\' + loc.getShare() + loc.getUNCPath() ); if ( !t.isPossiblyDfs() ) { if ( t.isInDomainDfs() ) { DfsReferralData dr = this.ctx.getDfs().resolve(this.ctx, loc.getServer(), loc.getShare(), loc.getUNCPath()); if ( dr != null ) { if ( log.isDebugEnabled() ) {
String rfullpath = request != null ? request.getFullUNCPath() : ( '\\' + loc.getServer() + '\\' + loc.getShare() + loc.getUNCPath() ); if ( !t.isPossiblyDfs() ) { if ( t.isInDomainDfs() ) { DfsReferralData dr = this.ctx.getDfs().resolve(this.ctx, loc.getServer(), loc.getShare(), loc.getUNCPath()); if ( dr != null ) { if ( log.isDebugEnabled() ) {