class OccupantUpdatedTask implements ClusterTask<Void>
{
    private String subdomain;
    private String roomName;
    private String oldNickname;
    private String newNickname;
    private JID realJID;
    private NodeID originator;

    public OccupantUpdatedTask() {}

    public OccupantUpdatedTask(@Nonnull final String subdomain, @Nonnull final String roomName, @Nonnull final String oldNickname, @Nonnull final String newNickname, @Nonnull final JID realJID, @Nonnull final NodeID originator) {
        this.subdomain = subdomain;
        this.roomName = roomName;
        this.oldNickname = oldNickname;
        this.newNickname = newNickname;
        this.realJID = realJID;
        this.originator = originator;
    }

    public String getSubdomain() {
        return subdomain;
    }

    public String getRoomName() {
        return roomName;
    }

    public String getOldNickname() {
        return oldNickname;
    }

    public String getNewNickname() {
        return newNickname;
    }

    public JID getRealJID() {
        return realJID;
    }

    public NodeID getOriginator() {
        return originator;
    }

    @Override
    public Void getResult() {
        return null;
    }

    @Override
    public void run() {
        final MultiUserChatService multiUserChatService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain);
        multiUserChatService.getOccupantManager().process(this);
    }

    @Override
    public void writeExternal(ObjectOutput out) throws IOException
    {<FILL_FUNCTION_BODY>}

    @Override
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
    {
        final ExternalizableUtil externalizableUtil = ExternalizableUtil.getInstance();
        subdomain = externalizableUtil.readSafeUTF(in);
        roomName = externalizableUtil.readSafeUTF(in);
        oldNickname = externalizableUtil.readSafeUTF(in);
        newNickname = externalizableUtil.readSafeUTF(in);
        realJID = (JID) externalizableUtil.readSerializable(in);
        originator = (NodeID) externalizableUtil.readSerializable(in);
    }
}

        final ExternalizableUtil externalizableUtil = ExternalizableUtil.getInstance();
        externalizableUtil.writeSafeUTF(out, subdomain);
        externalizableUtil.writeSafeUTF(out, roomName);
        externalizableUtil.writeSafeUTF(out, oldNickname);
        externalizableUtil.writeSafeUTF(out, newNickname);
        externalizableUtil.writeSerializable(out, realJID);
        externalizableUtil.writeSerializable(out, originator);
    
<no_super_class>