All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.util.protocol.api.ProtocolConfig Maven / Gradle / Ivy

The newest version!
/**
 * Copyright 2010-2012 Bull S.A.S.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.ow2.util.protocol.api;

import java.io.InputStream;
import java.io.OutputStream;

/**
 *
 * @author Loris Bouzonnet
 */
public class ProtocolConfig implements Cloneable {

    private InputStream inputStream;

    private OutputStream outputStream;

    private OutputStream errorStream;

    private String user;

    private String password;

    private String host;

    private Integer port;

    public InputStream getInputStream() {
        return inputStream;
    }

    public void setInputStream(final InputStream inputStream) {
        this.inputStream = inputStream;
    }

    public OutputStream getOutputStream() {
        return outputStream;
    }

    public void setOutputStream(final OutputStream outputStream) {
        this.outputStream = outputStream;
    }

    public OutputStream getErrorStream() {
        return errorStream;
    }

    public void setErrorStream(final OutputStream errorStream) {
        this.errorStream = errorStream;
    }

    public String getUser() {
        return user;
    }

    public void setUser(final String user) {
        this.user = user;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(final String password) {
        this.password = password;
    }

    public String getHost() {
        return host;
    }

    public void setHost(final String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(final Integer port) {
        this.port = port;
    }

    @Override
    public ProtocolConfig clone() {
        try {
            return (ProtocolConfig) super.clone();
        } catch (final CloneNotSupportedException e) {
            return null;
        }
    }

    @Override
    public String toString() {
        return "ProtocolConfig{" +
                "inputStream=" + inputStream +
                ", outputStream=" + outputStream +
                ", errorStream=" + errorStream +
                ", user='" + user + '\'' +
                ", password='" + password + '\'' +
                ", host='" + host + '\'' +
                ", port=" + port +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy