@Override
    public RemoteEvent encode(Event event) {
        OutputStream os;
        try {
            os = new ByteArrayOutputStream();
            ObjectOutputStream o = new ObjectOutputStream(os);

            o.writeObject(event);

            return new RemoteEvent(os.toString());
        } catch (IOException e) {
            e.printStackTrace();
        }

        return null;
    }