class OutgoingServerSessionTask extends RemoteSessionTask {
    protected DomainPair domainPair;

    public OutgoingServerSessionTask() {
    }

    protected OutgoingServerSessionTask(DomainPair domainPair, Operation operation) {
        super(operation);
        this.domainPair = domainPair;
    }

    Session getSession() {
        return SessionManager.getInstance().getOutgoingServerSession(domainPair);
    }

    public void run() {
        super.run();
        if (operation == Operation.getOutgoingDomainPairs) {
            result = ((OutgoingServerSession) getSession()).getOutgoingDomainPairs();
        }
        else if (operation == Operation.getAuthenticationMethod) {
            result = ((OutgoingServerSession) getSession()).getAuthenticationMethod();
        }
    }

    public void writeExternal(ObjectOutput out) throws IOException {
        super.writeExternal(out);
        ExternalizableUtil.getInstance().writeSerializable(out, domainPair);
    }

    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        super.readExternal(in);
        domainPair = (DomainPair) ExternalizableUtil.getInstance().readSerializable(in);
    }

    public String toString() {<FILL_FUNCTION_BODY>}
}

        return super.toString() + " operation: " + operation + " domain pair: " + domainPair;
    
<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