class RELPEventFactory implements EventFactory<RELPEvent> {

    @Override
    public RELPEvent create(final byte[] data, final Map<String, String> metadata, final ChannelResponder responder) {
        final long txnr = Long.valueOf(metadata.get(RELPMetadata.TXNR_KEY));
        final String command = metadata.get(RELPMetadata.COMMAND_KEY);
        final String sender = metadata.get(EventFactory.SENDER_KEY);
        return new RELPEvent(sender, data, responder, txnr, command);
    }

}