package com.jscape.inet.sftp.protocol.v4.messages;

import com.jscape.inet.sftp.protocol.messages.Message;
import com.jscape.util.net.connection.MessageConnection;

/**
 * @author Alex Usun
 */
public class SshFxpInit
        extends Message<SshFxpInit.Handler> {

    public final int version;

    public SshFxpInit(int version) {
        this.version = version;
    }

    @Override
    public void accept(Handler handler, MessageConnection<Message> connection) {
        handler.handle(this, connection);
    }

    @Override
    public String toString() {
        return "SshFxpInit {"
                + "version=" + this.version
                + '}';
    }

    public interface Handler
            extends Message.HandlerBase {

        void handle(SshFxpInit message, MessageConnection<Message> connection);

    }
}
