package com.jscape.inet.scp.protocol.marshaling;

import com.jscape.inet.scp.protocol.messages.*;

/**
 * @author Alex Usun
 */
public class Messages {

    private static final MessageCodec.Entry[] ENTRIES = {
            new MessageCodec.Entry(0, OkMessage.class, new OkMessageCodec()),
            new MessageCodec.Entry(1, WarningMessage.class, new WarningMessageCodec()),
            new MessageCodec.Entry(2, FatalErrorMessage.class, new FatalErrorMessageCodec()),
            new MessageCodec.Entry('C', FileMessage.class, new FileMessageCodec()),
            new MessageCodec.Entry('D', DirectoryMessage.class, new DirectoryMessageCodec()),
            new MessageCodec.Entry('E', EndDirectoryMessage.class, new EndDirectoryMessageCodec()),
            new MessageCodec.Entry('T', TimeMessage.class, new TimeMessageCodec())
    };

    public static MessageCodec init(MessageCodec codec) {
        return codec.set(ENTRIES);
    }

    private Messages() {
    }
}
