本文整理汇总了Java中org.omg.CosNaming.NamingContextExtPackage.StringNameHelper类的典型用法代码示例。如果您正苦于以下问题:Java StringNameHelper类的具体用法?Java StringNameHelper怎么用?Java StringNameHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StringNameHelper类属于org.omg.CosNaming.NamingContextExtPackage包,在下文中一共展示了StringNameHelper类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: resolve_str
import org.omg.CosNaming.NamingContextExtPackage.StringNameHelper; //导入依赖的package包/类
/** {@inheritDoc} */
public org.omg.CORBA.Object resolve_str(String a_name_string)
throws NotFound, CannotProceed, InvalidName
{
InputStream in = null;
try
{
OutputStream _out = _request("resolve_str", true);
StringNameHelper.write(_out, a_name_string);
in = _invoke(_out);
return ObjectHelper.read(in);
}
catch (ApplicationException ex)
{
in = ex.getInputStream();
String id = ex.getId();
throw4(in, id);
// Should never happen.
throw new InternalError();
}
catch (RemarshalException _rm)
{
return resolve_str(a_name_string);
}
finally
{
_releaseReply(in);
}
}
开发者ID:vilie,项目名称:javify,代码行数:33,代码来源:_NamingContextExtStub.java
示例2: to_url
import org.omg.CosNaming.NamingContextExtPackage.StringNameHelper; //导入依赖的package包/类
/** {@inheritDoc} */
public String to_url(String an_address, String a_name_string)
throws InvalidAddress, InvalidName
{
InputStream in = null;
try
{
OutputStream _out = _request("to_url", true);
AddressHelper.write(_out, an_address);
StringNameHelper.write(_out, a_name_string);
in = _invoke(_out);
return URLStringHelper.read(in);
}
catch (ApplicationException ex)
{
in = ex.getInputStream();
String id = ex.getId();
if (id.equals(InvalidAddressHelper.id()))
throw InvalidAddressHelper.read(in);
else if (id.equals(InvalidNameHelper.id()))
throw InvalidNameHelper.read(in);
else
throw new MARSHAL(id);
}
catch (RemarshalException _rm)
{
return to_url(an_address, a_name_string);
}
finally
{
_releaseReply(in);
}
}
开发者ID:vilie,项目名称:javify,代码行数:36,代码来源:_NamingContextExtStub.java
注:本文中的org.omg.CosNaming.NamingContextExtPackage.StringNameHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论