Made encodeMessage() abstract