本文整理汇总了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();
}
示例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 ;
}
示例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);
}
}