You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
612 B
24 lines
612 B
package network.MessageEncoders;
|
|
|
|
|
|
import network.Exceptions.InvalidMessageException;
|
|
import network.Messages.AC35Data;
|
|
|
|
|
|
/**
|
|
* This is the interface that all message encoders must implement.
|
|
* It allows for {@link #encode(AC35Data)}ing messages.
|
|
*/
|
|
public interface MessageEncoder {
|
|
|
|
|
|
/**
|
|
* Encodes a given message.
|
|
* @param message The message to encode.
|
|
* @return Message in byte encoded form.
|
|
* @throws InvalidMessageException Thrown if the message is invalid in some way, or cannot be encoded.
|
|
*/
|
|
public byte[] encode(AC35Data message) throws InvalidMessageException;
|
|
|
|
}
|