package com.eactive.eai.adapter.socket2.protocol.snmp.codec;

import com.eactive.eai.adapter.socket2.protocol.ISocketAdapter;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

public class SnmpCodecFactory implements ProtocolCodecFactory {
	private ProtocolDecoder decoder;
	
	public SnmpCodecFactory(ISocketAdapter adapter) {
		decoder = new SnmpDecoder(adapter);
	}

	public SnmpCodecFactory() {
		decoder = new SnmpDecoder();
	}
	
	public ProtocolDecoder getDecoder() throws Exception {
		return decoder;
	}

	public ProtocolEncoder getEncoder() throws Exception {
		throw new UnsupportedOperationException();
	}
}
