当前位置: 首页>>代码示例>>Java>>正文


Java CorbaResourceUtil类代码示例

本文整理汇总了Java中com.sun.corba.se.impl.orbutil.CorbaResourceUtil的典型用法代码示例。如果您正苦于以下问题:Java CorbaResourceUtil类的具体用法?Java CorbaResourceUtil怎么用?Java CorbaResourceUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CorbaResourceUtil类属于com.sun.corba.se.impl.orbutil包,在下文中一共展示了CorbaResourceUtil类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: printAvailableCommands

import com.sun.corba.se.impl.orbutil.CorbaResourceUtil; //导入依赖的package包/类
void printAvailableCommands()
{
    CommandHandler handler;

    // print short help
    System.out.println(CorbaResourceUtil.getText("servertool.shorthelp"));

    for (int i=0; i < handlers.size(); i++) {
        handler = (CommandHandler) handlers.elementAt(i);
        System.out.print("\t" + handler.getCommandName());
        for (int j=handler.getCommandName().length();
             j < maxNameLen; j++) System.out.print(" ");
        System.out.print(" - ");
        handler.printCommandHelp(System.out,
                                 CommandHandler.shortHelp);
    }

    System.out.println();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:ServerTool.java

示例2: processCommand

import com.sun.corba.se.impl.orbutil.CorbaResourceUtil; //导入依赖的package包/类
public boolean processCommand( String[] cmdArgs, ORB orb, PrintStream out )
{
    if ((cmdArgs.length == 2) && cmdArgs[0].equals( "-applicationName" )) {
        String str = (String)cmdArgs[1] ;

        try {
            Repository repository = RepositoryHelper.narrow(
                orb.resolve_initial_references( ORBConstants.SERVER_REPOSITORY_NAME ));

            try {
                int result = repository.getServerID( str ) ;
                out.println() ;
                out.println(CorbaResourceUtil.getText("servertool.getserverid2", str, Integer.toString(result)));
                out.println() ;
            } catch (ServerNotRegistered e) {
                out.println(CorbaResourceUtil.getText("servertool.nosuchserver"));
            }
        } catch (Exception ex) {
            ex.printStackTrace() ;
        }

        return commandDone ;
    } else
        return parseError ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:ServerTool.java

示例3: run

import com.sun.corba.se.impl.orbutil.CorbaResourceUtil; //导入依赖的package包/类
protected void run()
{
    try {

        // create the persistent name service
        NameService ns = new NameService(orb, dbDir);

        // add root naming context to initial naming
        NamingContext rootContext = ns.initialNamingContext();
        InitialNameService ins = InitialNameServiceHelper.narrow(
                                 orb.resolve_initial_references(
                                 ORBConstants.INITIAL_NAME_SERVICE_NAME ));
        ins.bind( "NameService", rootContext, true);
        System.out.println(CorbaResourceUtil.getText("pnameserv.success"));

        // wait for invocations
        orb.run();

    } catch (Exception ex) {

        ex.printStackTrace(System.err);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:NameServer.java


注:本文中的com.sun.corba.se.impl.orbutil.CorbaResourceUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。