ControlAgentPOA.java 2.81 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.service;

import com.adobe.service.ControlAgent;
import com.adobe.service.ControlAgentHelper;
import com.adobe.service.ControlAgentOperations;
import com.adobe.service.ControlAgentPackage.CategoryTable;
import com.adobe.service.ControlAgentPackage.CategoryTableSeqHelper;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.ORB;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.InvokeHandler;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.ResponseHandler;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.Servant;

import java.util.Hashtable;

public abstract class ControlAgentPOA
extends Servant
implements InvokeHandler,
ControlAgentOperations {
    private static final Hashtable m_opsHash = new Hashtable();
    private String[] ids = new String[]{"IDL:com/adobe/service/ControlAgent:1.0"};

    public ControlAgent _this() {
        return ControlAgentHelper.narrow(this._this_object());
    }

    public ControlAgent _this(ORB orb) {
        return ControlAgentHelper.narrow(this._this_object(orb));
    }

    public OutputStream _invoke(String method, InputStream _input, ResponseHandler handler) throws SystemException {
        OutputStream _out = null;
        Integer opsIndex = (Integer)m_opsHash.get(method);
        if (null == opsIndex) {
            throw new BAD_OPERATION(method + " not found");
        }
        switch (opsIndex) {
            case 0: {
                boolean _arg0 = _input.read_boolean();
                _out = handler.createReply();
                this.done(_arg0);
                break;
            }
            case 1: {
                _out = handler.createReply();
                _out.write_boolean(this.prepare());
                break;
            }
            case 2: {
                CategoryTable[] _arg0 = CategoryTableSeqHelper.read(_input);
                _out = handler.createReply();
                this.setJdkLogLevel(_arg0);
                break;
            }
            case 3: {
                _out = handler.createReply();
                _out.write_Object(this.newRequestHandler());
                break;
            }
            case 4: {
                int _arg0 = _input.read_long();
                _out = handler.createReply();
                this.setLogLevel(_arg0);
                break;
            }
        }
        return _out;
    }

    public String[] _all_interfaces(POA poa, byte[] obj_id) {
        return this.ids;
    }

    static {
        m_opsHash.put("done", new Integer(0));
        m_opsHash.put("prepare", new Integer(1));
        m_opsHash.put("setJdkLogLevel", new Integer(2));
        m_opsHash.put("newRequestHandler", new Integer(3));
        m_opsHash.put("setLogLevel", new Integer(4));
    }
}