本文整理了Java中org.omg.CORBA.Any.insert_string()
方法的一些代码示例,展示了Any.insert_string()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Any.insert_string()
方法的具体详情如下:
包路径:org.omg.CORBA.Any
类名称:Any
方法名:insert_string
暂无
代码示例来源:origin: org.apache.yoko/yoko-spec-corba
public static void insert(org.omg.CORBA.Any any, java.lang.String s) {
any.insert_string(s);
}
代码示例来源:origin: org.jacorb/jacorb-services
private synchronized Property[] getFilterableHeader()
{
if (filterableHeader_ == null)
{
filterableHeader_ = new Property[parameters_.length + 1];
Any _operationAny = sORB.create_any();
_operationAny.insert_string(operationName_);
filterableHeader_[0] = new Property(OPERATION_NAME, _operationAny);
for (int x = 0; x < parameters_.length; ++x)
{
filterableHeader_[1 + x] = parameters_[x];
}
}
return filterableHeader_;
}
代码示例来源:origin: org.jacorb/jacorb-services
public Any evaluateTypeName(Any value) throws EvaluationException
{
try
{
TypeCode _tc = value.type();
Any _ret = orb_.create_any();
_ret.insert_string(_tc.name());
return _ret;
} catch (BadKind e)
{
throw newEvaluationException(e);
}
}
代码示例来源:origin: org.apache.yoko/yoko-rmi-impl
/**
* @see org.omg.PortableInterceptor.IORInterceptorOperations#establish_components(IORInfo)
*/
public void establish_components(IORInfo info) {
String codeBase = (String) currentCodeBase.get();
if (codeBase != null) {
logger.finer("registering " + codeBase + " for ORB");
//
// Create encapsulation
//
Any any = ORB.init().create_any();
any.insert_string(codeBase);
try {
byte[] data = codec.encode(any);
TaggedComponent component = new TaggedComponent(
TAG_JAVA_CODEBASE.value, data);
info.add_ior_component(component);
} catch (InvalidTypeForEncoding e) {
logger.log(Level.WARNING, "Failed to add java codebase to IOR" + e.getMessage(), e);
}
}
}
代码示例来源:origin: org.jacorb/jacorb-services
public Any evaluateRepositoryId(Any value) throws EvaluationException
{
try
{
TypeCode _tc = value.type();
Any _ret = orb_.create_any();
_ret.insert_string(_tc.id());
return _ret;
} catch (BadKind e)
{
throw newEvaluationException(e);
}
}
代码示例来源:origin: org.jacorb/jacorb
public void insert_string(java.lang.String value)
throws TypeMismatch
{
checkDestroyed ();
org.omg.CORBA.Any any = getRepresentation();
if( any.type().kind() != org.omg.CORBA.TCKind.tk_string)
{
throw new TypeMismatch ();
}
any.insert_string(value);
}
代码示例来源:origin: org.apache.yoko/yoko-core
public org.omg.CORBA.NVList get_values(String start_scope, int op_flags,
String pattern) {
if (start_scope == null) {
throw new org.omg.CORBA.BAD_PARAM(
org.apache.yoko.orb.OB.MinorCodes
.describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidScope),
org.apache.yoko.orb.OB.MinorCodes.MinorInvalidScope, CompletionStatus.COMPLETED_NO);
}
if (pattern == null) {
throw new org.omg.CORBA.BAD_PARAM(
org.apache.yoko.orb.OB.MinorCodes
.describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidPattern),
org.apache.yoko.orb.OB.MinorCodes.MinorInvalidPattern, CompletionStatus.COMPLETED_NO);
}
java.util.Vector seq = new java.util.Vector();
_OB_getValues(start_scope, op_flags, pattern, seq);
if (seq.isEmpty())
throw new org.omg.CORBA.BAD_CONTEXT(
org.apache.yoko.orb.OB.MinorCodes
.describeBadContext(org.apache.yoko.orb.OB.MinorCodes.MinorNoPatternMatch),
org.apache.yoko.orb.OB.MinorCodes.MinorNoPatternMatch, CompletionStatus.COMPLETED_NO);
NVList values = new NVList(orb_);
for (int i = 0; i < seq.size(); i += 2) {
org.omg.CORBA.Any any = orb_.create_any();
any.insert_string((String) seq.elementAt(i + 1));
values.add_value((String) seq.elementAt(i), any, 0);
}
return values;
}
代码示例来源:origin: org.jacorb/jacorb
result.insert_string(value);
break;
代码示例来源:origin: apache/cxf
break;
case TCKind._tk_string:
any.insert_string((String)value);
break;
case TCKind._tk_wstring:
代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj
private final void associateContext () throws SystemException
{
if (_piCurrent != null)
{
try
{
int slotId = OTSManager.getLocalSlotId();
if (slotId != -1)
{
org.omg.CORBA.Any localDataAny = ORBManager.getORB().orb().create_any();
localDataAny.insert_string(ThreadUtil.getThreadId());
_piCurrent.set_slot(slotId, localDataAny);
}
}
catch (InvalidSlot is)
{
// Something very wrong
throw new org.omg.CORBA.INTERNAL();
}
}
}
代码示例来源:origin: jboss.jbossts/jbossjts
private final void associateContext () throws SystemException
{
if (_piCurrent != null)
{
try
{
int slotId = OTSManager.getLocalSlotId();
if (slotId != -1)
{
org.omg.CORBA.Any localDataAny = ORBManager.getORB().orb().create_any();
localDataAny.insert_string(ThreadUtil.getThreadId());
_piCurrent.set_slot(slotId, localDataAny);
}
}
catch (InvalidSlot is)
{
// Something very wrong
throw new org.omg.CORBA.INTERNAL();
}
}
}
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
public void insert_string(String value)
throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
if (any.type().kind().value() != TCKind._tk_string)
throw new TypeMismatch();
if (value == null)
throw new InvalidValue();
// Throw InvalidValue if this is a bounded string and the length is exceeded
try {
if (any.type().length() > 0 && any.type().length() < value.length())
throw new InvalidValue();
} catch (BadKind bad) { // impossible
}
any.insert_string(value);
}
代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj
data.insert_string(stringRef);
代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj
data.insert_string(stringRef);
代码示例来源:origin: jboss.jbossts/jbossjts
data.insert_string(stringRef);
代码示例来源:origin: apache/cxf
break;
case TCKind._tk_string:
a.insert_string((String)primitive.getValue());
break;
case TCKind._tk_wstring:
代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj
threadData.insert_string(ThreadUtil.getThreadId());
代码示例来源:origin: jboss.jbossts/jbossjts
threadData.insert_string(ThreadUtil.getThreadId());
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
returnValue.insert_string("");
break;
case TCKind._tk_wstring:
代码示例来源:origin: org.jacorb/jacorb
break;
case TCKind._tk_string:
_any.insert_string("");
break;
case TCKind._tk_wstring:
内容来源于网络,如有侵权,请联系作者删除!