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

📄 whoami.java

📁 Software Testing Automation Framework (STAF)的开发代码
💻 JAVA
字号:
/*****************************************************************************//* Software Testing Automation Framework (STAF)                              *//* (C) Copyright IBM Corp. 2001, 2004                                        *//*                                                                           *//* This software is licensed under the Common Public License (CPL) V1.0.     *//*****************************************************************************/package com.ibm.staf.service.whoami;import com.ibm.staf.*;import com.ibm.staf.service.*;public class WhoAmI implements STAFServiceInterfaceLevel30{    public WhoAmI() { /* Do Nothing */ }    public STAFResult init(STAFServiceInterfaceLevel30.InitInfo info)    {        try        {            fHandle = new STAFHandle("STAF/Service/" + info.name);        }        catch (STAFException e)        {            return new STAFResult(                STAFResult.STAFRegistrationError, e.toString());        }        return new STAFResult(STAFResult.Ok);    }    public STAFResult acceptRequest(STAFServiceInterfaceLevel30.RequestInfo info)    {        STAFResult res = fHandle.submit2(info.endpoint, "MISC", "WHOAMI");        if (res.rc != 0)            return res;        return new STAFResult(STAFResult.Ok, res.result);    }    public STAFResult term()    {        // Un-register the service handle        try        {            fHandle.unRegister();        }        catch (STAFException e)        {            return new STAFResult(                STAFResult.STAFRegistrationError, e.toString());        }        return new STAFResult(STAFResult.Ok);    }    private STAFHandle fHandle;}

⌨️ 快捷键说明

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