class IncomingServerSessionInfo implements Externalizable
{
    private NodeID nodeID;
    private Set<String> validatedDomains;

    public IncomingServerSessionInfo() {
    }

    public NodeID getNodeID() {
        return nodeID;
    }

    public Set<String> getValidatedDomains() {
        return validatedDomains;
    }

    public IncomingServerSessionInfo(@Nonnull final LocalIncomingServerSession serverSession) {
        this.nodeID = XMPPServer.getInstance().getNodeID();
        validatedDomains = new HashSet<>(serverSession.getValidatedDomains());
    }

    @Override
    public void writeExternal(ObjectOutput out) throws IOException {
        ExternalizableUtil.getInstance().writeSerializable(out, nodeID);
        ExternalizableUtil.getInstance().writeSerializableCollection(out, validatedDomains);
    }

    @Override
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        nodeID = (NodeID) ExternalizableUtil.getInstance().readSerializable(in);
        validatedDomains = new HashSet<>();
        ExternalizableUtil.getInstance().readSerializableCollection(in, validatedDomains, this.getClass().getClassLoader());
    }

    @Override
    public String toString() {<FILL_FUNCTION_BODY>}
}

        return "IncomingServerSessionInfo{" +
            "nodeID=" + nodeID +
            ", validatedDomains=" + validatedDomains +
            '}';
    
<no_super_class>