package com.nokia.sms.sgip.codec;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

public class SgipCodecFactory implements ProtocolCodecFactory {
    private ProtocolDecoder decoder;
    private ProtocolEncoder encoder;

    public SgipCodecFactory() {
        this.decoder = new SgipMessageDecoder();
        this.encoder = new SgipMessageEncoder();
    }

    public ProtocolDecoder getDecoder(IoSession session)
            throws Exception {
        return this.decoder;
    }

    public ProtocolEncoder getEncoder(IoSession session)
            throws Exception {
        return this.encoder;
    }
}
