Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package io.packagecloud.client;
 
Connection, used to manage host/scheme/port configuration
 
 public class Connection {
     private static Logger logger = LoggerProvider.getLogger();
    private final String host;
    private final String scheme;
    private final Integer port;

    
Instantiates a new Connection.

Parameters:
host the host
port the port
scheme the scheme
    public Connection(String host,  Integer portString scheme) {
        this. = host;
        this. = scheme;
        this. = port;
        .info(String.format("Connecting to %s://%s:%s"schemehostport));
    }

    
Instantiates a new Connection.
    public Connection(){
        this("packagecloud.io", 443, "https");
    }

    
Gets host.

Returns:
the host
    public String getHost() {
        return ;
    }

    
Gets scheme.

Returns:
the scheme
    public String getScheme() {
        return ;
    }

    
Gets port.

Returns:
the port
    public Integer getPort() {
        return ;
    }
New to GrepCode? Check out our FAQ X