io.infinicast.APlayCodecFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinicast-client Show documentation
Show all versions of infinicast-client Show documentation
Infinicast SDK to communicate with the cloud.
package io.infinicast;
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;
/**
* Created by Michael on 17.08.2015.
*/
public class APlayCodecFactory implements ProtocolCodecFactory {
private ProtocolEncoder encoder;
private ProtocolDecoder decoder;
public APlayCodecFactory() {
encoder = new APlayProtocolEncoder();
decoder = new APlayProtocolDecoder();
}
/**
* Return the singleton encoder
*
* @param ioSession
* @return
* @throws Exception
*/
public ProtocolEncoder getEncoder(IoSession ioSession) throws Exception {
return encoder;
}
/**
* Return the singleton decoder
*
* @param ioSession
* @return
* @throws Exception
*/
public ProtocolDecoder getDecoder(IoSession ioSession) throws Exception {
return decoder;
}
}