class ClientSessionInfo implements Externalizable {
    private Presence presence;
    private String defaultList;
    private String activeList;
    private boolean offlineFloodStopped;
    private boolean messageCarbonsEnabled;
    private boolean hasRequestedBlocklist;
    private NodeID nodeID;
    private boolean anonymous;

    public ClientSessionInfo() {
    }

    public ClientSessionInfo(LocalClientSession session) {
        presence = session.getPresence();
        defaultList = session.getDefaultList() != null ? session.getDefaultList().getName() : null;
        activeList = session.getActiveList() != null ? session.getActiveList().getName() : null;
        offlineFloodStopped = session.isOfflineFloodStopped();
        messageCarbonsEnabled = session.isMessageCarbonsEnabled();
        hasRequestedBlocklist = session.hasRequestedBlocklist();
        nodeID = XMPPServer.getInstance().getNodeID();
        anonymous = session.isAnonymousUser();
    }

    public Presence getPresence() {
        return presence;
    }

    public String getDefaultList() {
        return defaultList;
    }

    public String getActiveList() {
        return activeList;
    }

    public boolean isOfflineFloodStopped() {
        return offlineFloodStopped;
    }
    
    public boolean hasRequestedBlocklist() {
        return hasRequestedBlocklist;
    }
    
    public boolean isMessageCarbonsEnabled() { return messageCarbonsEnabled; }

    public NodeID getNodeID() {
        return nodeID;
    }

    public boolean isAnonymous() {
        return anonymous;
    }

    @Override
    public void writeExternal(ObjectOutput out) throws IOException {
        ExternalizableUtil.getInstance().writeSerializable(out, (DefaultElement) presence.getElement());
        ExternalizableUtil.getInstance().writeBoolean(out, defaultList != null);
        if (defaultList != null) {
            ExternalizableUtil.getInstance().writeSafeUTF(out, defaultList);
        }
        ExternalizableUtil.getInstance().writeBoolean(out, activeList != null);
        if (activeList != null) {
            ExternalizableUtil.getInstance().writeSafeUTF(out, activeList);
        }
        ExternalizableUtil.getInstance().writeBoolean(out, offlineFloodStopped);
        ExternalizableUtil.getInstance().writeBoolean(out, messageCarbonsEnabled);    
        ExternalizableUtil.getInstance().writeBoolean(out, hasRequestedBlocklist);
        ExternalizableUtil.getInstance().writeSerializable(out, nodeID);
        ExternalizableUtil.getInstance().writeBoolean(out, anonymous);
    }

    @Override
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {<FILL_FUNCTION_BODY>}
}

        Element packetElement = (Element) ExternalizableUtil.getInstance().readSerializable(in);
        presence = new Presence(packetElement, true);
        if (ExternalizableUtil.getInstance().readBoolean(in)) {
            defaultList = ExternalizableUtil.getInstance().readSafeUTF(in);
        }
        if (ExternalizableUtil.getInstance().readBoolean(in)) {
            activeList = ExternalizableUtil.getInstance().readSafeUTF(in);
        }
        offlineFloodStopped = ExternalizableUtil.getInstance().readBoolean(in);
        messageCarbonsEnabled = ExternalizableUtil.getInstance().readBoolean(in);
        hasRequestedBlocklist = ExternalizableUtil.getInstance().readBoolean(in);
        nodeID = (NodeID) ExternalizableUtil.getInstance().readSerializable(in);
        anonymous = ExternalizableUtil.getInstance().readBoolean(in);
    
<no_super_class>