package ch.ethz.syslab.telesto.common.protocol.handler;
import ch.ethz.syslab.telesto.common.protocol.*;
import ch.ethz.syslab.telesto.common.util.ErrorType;
/*
* Do not edit this file! {# Ignore this, you're in the right place. #}
*
* Edit the template at tools/protocol/telesto/templates/handler.java instead.
*/
public abstract class {{ handler }} {
{%- for message in messages if message %}
public Packet handle({{ message.__name__ }}{{ superclass }} packet) throws PacketProcessingException {
unhandledPacket(packet);
return null;
}
{% endfor %}
private void unhandledPacket(Packet packet) throws PacketProcessingException {
throw new PacketProcessingException(ErrorType.UNEXPECTED_PACKET, "Received unexpected packet " + packet.toString());
}
}