class IncomingServerSessionTask extends RemoteSessionTask {
    private StreamID streamID;

    public IncomingServerSessionTask() {
        super();
    }

    protected IncomingServerSessionTask(Operation operation, StreamID streamID) {
        super(operation);
        this.streamID = streamID;
    }

    Session getSession() {
        return SessionManager.getInstance().getIncomingServerSession(streamID);
    }

    public void run() {<FILL_FUNCTION_BODY>}

    public void writeExternal(ObjectOutput out) throws IOException {
        super.writeExternal(out);
        ExternalizableUtil.getInstance().writeSafeUTF(out, streamID.getID());
    }

    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        super.readExternal(in);
        streamID = BasicStreamIDFactory.createStreamID( ExternalizableUtil.getInstance().readSafeUTF(in) );
    }

    public String toString() {
        return super.toString() + " operation: " + operation + " streamID: " + streamID;
    }
}

        super.run();

        switch (operation) {
            case getLocalDomain:
                result = ((IncomingServerSession) getSession()).getLocalDomain();
                break;

            case getAddress:
                result = getSession().getAddress();
                break;

            case getAuthenticationMethod:
                result = ((IncomingServerSession) getSession()).getAuthenticationMethod();
                break;

            case getValidatedDomains:
                result = ((IncomingServerSession) getSession()).getValidatedDomains();
                break;
        }
    
<methods>public void <init>() ,public java.lang.Object getResult() ,public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException,public void run() ,public void writeExternal(java.io.ObjectOutput) throws java.io.IOException<variables>private static final Logger Log,protected org.jivesoftware.openfire.session.RemoteSessionTask.Operation operation,protected java.lang.Object result