1 31 32 package org.apache.commons.httpclient; 33 34 44 public class NTCredentials extends UsernamePasswordCredentials { 45 46 48 49 private String domain; 50 51 52 private String host; 53 54 55 57 60 public NTCredentials() { 61 super(); 62 } 63 64 73 public NTCredentials(String userName, String password, String host, 74 String domain) { 75 super(userName, password); 76 this.domain = domain; 77 this.host = host; 78 } 79 81 82 90 public void setDomain(String domain) { 91 this.domain = domain; 92 } 93 94 102 public String getDomain() { 103 return domain; 104 } 105 106 110 public void setHost(String host) { 111 this.host = host; 112 } 113 114 119 public String getHost() { 120 return this.host; 121 } 122 123 127 public String toString() { 128 final StringBuffer sbResult = new StringBuffer (super.toString()); 129 130 sbResult.append(":"); 131 sbResult.append(this.host == null ? "null" : this.host); 132 sbResult.append(this.domain == null ? "null" : this.domain); 133 134 return sbResult.toString(); 135 } 136 137 } 138 | Popular Tags |