⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smgpeventadapter.java

📁 华为java接口反编译结果!其中包含其所有接口实现过程
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   SMGPSMProxy.java

package com.huawei.smproxy;

import com.huawei.insa2.comm.*;
import com.huawei.insa2.comm.smgp.SMGPConnection;
import com.huawei.insa2.comm.smgp.SMGPTransaction;
import com.huawei.insa2.comm.smgp.message.*;

// Referenced classes of package com.huawei.smproxy:
//            SMGPSMProxy

class SMGPEventAdapter extends PEventAdapter
{

    private SMGPSMProxy smProxy;
    private SMGPConnection conn;

    public SMGPEventAdapter(SMGPSMProxy smProxy)
    {
        this.smProxy = null;
        conn = null;
        this.smProxy = smProxy;
        conn = smProxy.getConn();
    }

    public void childCreated(PLayer child)
    {
        SMGPTransaction t = (SMGPTransaction)child;
        SMGPMessage msg = t.getResponse();
        SMGPMessage resmsg = null;
        if(msg.getRequestId() == 6)
        {
            resmsg = new SMGPExitRespMessage();
            smProxy.onTerminate();
        } else
        if(msg.getRequestId() == 4)
            resmsg = new SMGPActiveTestRespMessage();
        else
        if(msg.getRequestId() == 3)
        {
            SMGPDeliverMessage tmpmes = (SMGPDeliverMessage)msg;
            resmsg = smProxy.onDeliver(tmpmes);
        } else
        {
            t.close();
        }
        if(resmsg != null)
        {
            try
            {
                t.send(resmsg);
            }
            catch(PException e)
            {
                e.printStackTrace();
            }
            t.close();
        }
        if(msg.getRequestId() == 6)
            conn.close();
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -