
org.webpieces.httpparser.api.dto.UrlInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-parser1_1 Show documentation
Show all versions of http-parser1_1 Show documentation
A re-usable asynchronous http 1.1 parser that can be used with any nio client
The newest version!
package org.webpieces.httpparser.api.dto;
public class UrlInfo {
private String prefix;
private String host;
private Integer port;
private String fullPath;
public UrlInfo(String fullPath) {
this.fullPath = fullPath;
}
public UrlInfo(String prefix, String host, Integer port, String fullPath) {
this.prefix = prefix;
this.host = host;
this.port = port;
this.fullPath = fullPath;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public Integer getResolvedPort() {
if(port == null) {
if("https".equals(prefix))
return 443;
else if("http".equals(prefix))
return 80;
else
return null;
}
return port;
}
public Integer getPort() {
return port;
}
public void setPort(Integer port) {
this.port = port;
}
public String getFullPath() {
return fullPath;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy