public static int getRequestId(Message msg) {
switch (msg.getType()) {
case GIOPRequest :
return ((RequestMessage) msg).getRequestId();
case GIOPReply :
return ((ReplyMessage) msg).getRequestId();
case GIOPLocateRequest :
return ((LocateRequestMessage) msg).getRequestId();
case GIOPLocateReply :
return ((LocateReplyMessage) msg).getRequestId();
case GIOPCancelRequest :
return ((CancelRequestMessage) msg).getRequestId();
case GIOPFragment :
return ((FragmentMessage) msg).getRequestId();
}
throw wrapper.illegalGiopMsgType(
CompletionStatus.COMPLETED_MAYBE);
}
java类org.omg.CORBA.CompletionStatus的实例源码
MessageBase.java 文件源码
项目:OpenJSharp
阅读 21
收藏 0
点赞 0
评论 0
MessageBase.java 文件源码
项目:openjdk-jdk10
阅读 21
收藏 0
点赞 0
评论 0
public static ReplyMessage createReply(
ORB orb, GIOPVersion gv, byte encodingVersion, int request_id,
int reply_status, ServiceContexts service_contexts, IOR ior) {
if (gv.equals(GIOPVersion.V1_0)) { // 1.0
return new ReplyMessage_1_0(orb, service_contexts, request_id,
reply_status, ior);
} else if (gv.equals(GIOPVersion.V1_1)) { // 1.1
return new ReplyMessage_1_1(orb, service_contexts, request_id,
reply_status, ior);
} else if (gv.equals(GIOPVersion.V1_2)) { // 1.2
ReplyMessage msg =
new ReplyMessage_1_2(orb, request_id, reply_status,
service_contexts, ior);
msg.setEncodingVersion(encodingVersion);
return msg;
} else {
throw wrapper.giopVersionError(
CompletionStatus.COMPLETED_MAYBE);
}
}
CDROutputStream_1_0.java 文件源码
项目:OpenJSharp
阅读 22
收藏 0
点赞 0
评论 0
private void writeIDLValue(Serializable object, String repID)
{
if (object instanceof StreamableValue) {
((StreamableValue)object)._write(parent);
} else if (object instanceof CustomValue) {
((CustomValue)object).marshal(parent);
} else {
BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
boolean isCustom = false;
if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
try {
if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
isCustom = true;
} catch(BadKind ex) {
throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
ex ) ;
}
}
if (isCustom)
((CustomMarshal)object).marshal(parent);
else
helper.write_value(parent, object);
}
}
ORBUtilSystemException.java 文件源码
项目:OpenJSharp
阅读 22
收藏 0
点赞 0
评论 0
public INTERNAL nullReplyInGetAddrDisposition( CompletionStatus cs, Throwable t ) {
INTERNAL exc = new INTERNAL( NULL_REPLY_IN_GET_ADDR_DISPOSITION, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "ORBUTIL.nullReplyInGetAddrDisposition",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
OMGSystemException.java 文件源码
项目:OpenJSharp
阅读 25
收藏 0
点赞 0
评论 0
public BAD_TYPECODE illegalParameter( CompletionStatus cs, Throwable t ) {
BAD_TYPECODE exc = new BAD_TYPECODE( ILLEGAL_PARAMETER, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "OMG.illegalParameter",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
ORBUtilSystemException.java 文件源码
项目:OpenJSharp
阅读 21
收藏 0
点赞 0
评论 0
public INTERNAL badCodeSetString( CompletionStatus cs, Throwable t ) {
INTERNAL exc = new INTERNAL( BAD_CODE_SET_STRING, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "ORBUTIL.badCodeSetString",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
OMGSystemException.java 文件源码
项目:OpenJSharp
阅读 31
收藏 0
点赞 0
评论 0
public BAD_INV_ORDER badOperationAfterShutdown( CompletionStatus cs, Throwable t ) {
BAD_INV_ORDER exc = new BAD_INV_ORDER( BAD_OPERATION_AFTER_SHUTDOWN, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "OMG.badOperationAfterShutdown",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
OMGSystemException.java 文件源码
项目:OpenJSharp
阅读 39
收藏 0
点赞 0
评论 0
public NO_RESOURCES piOperationNotSupported8( CompletionStatus cs, Throwable t ) {
NO_RESOURCES exc = new NO_RESOURCES( PI_OPERATION_NOT_SUPPORTED8, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.FINE )) {
Object[] parameters = null ;
doLog( Level.FINE, "OMG.piOperationNotSupported8",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
UtilSystemException.java 文件源码
项目:OpenJSharp
阅读 21
收藏 0
点赞 0
评论 0
public BAD_PARAM connectNoTie( CompletionStatus cs, Throwable t ) {
BAD_PARAM exc = new BAD_PARAM( CONNECT_NO_TIE, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "UTIL.connectNoTie",
parameters, UtilSystemException.class, exc ) ;
}
return exc ;
}
IDLJavaSerializationOutputStream.java 文件源码
项目:openjdk-jdk10
阅读 22
收藏 0
点赞 0
评论 0
public final void write_any(Any any) {
if (any == null) {
throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE);
}
write_TypeCode(any.type());
any.write_value(parent);
}
OMGSystemException.java 文件源码
项目:OpenJSharp
阅读 27
收藏 0
点赞 0
评论 0
public BAD_PARAM setExceptionBadAny( CompletionStatus cs, Throwable t ) {
BAD_PARAM exc = new BAD_PARAM( SET_EXCEPTION_BAD_ANY, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "OMG.setExceptionBadAny",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
ORBUtilSystemException.java 文件源码
项目:OpenJSharp
阅读 23
收藏 0
点赞 0
评论 0
public INTERNAL illegalReplyStatus( CompletionStatus cs, Throwable t ) {
INTERNAL exc = new INTERNAL( ILLEGAL_REPLY_STATUS, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "ORBUTIL.illegalReplyStatus",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
POASystemException.java 文件源码
项目:OpenJSharp
阅读 32
收藏 0
点赞 0
评论 0
public NO_IMPLEMENT methodNotImplemented( CompletionStatus cs, Throwable t ) {
NO_IMPLEMENT exc = new NO_IMPLEMENT( METHOD_NOT_IMPLEMENTED, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "POA.methodNotImplemented",
parameters, POASystemException.class, exc ) ;
}
return exc ;
}
IDLJavaSerializationOutputStream.java 文件源码
项目:OpenJSharp
阅读 22
收藏 0
点赞 0
评论 0
public final void write_any(Any any) {
if (any == null) {
throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE);
}
write_TypeCode(any.type());
any.write_value(parent);
}
CDRInputStream_1_0.java 文件源码
项目:openjdk-jdk10
阅读 23
收藏 0
点赞 0
评论 0
/**
* Examines the valuetag to see how many (if any) repository IDs
* are present on the wire. If no repository ID information
* is on the wire but the expectedType or expectedTypeRepId
* is known, it will return one of those (favoring the
* expectedType's repId). Failing that, it uses the supplied
* BoxedValueHelper to obtain the repository ID, as a last resort.
*/
private String readRepositoryIds(int valueTag,
Class expectedType,
String expectedTypeRepId,
BoxedValueHelper factory) {
switch(repIdUtil.getTypeInfo(valueTag)) {
case RepositoryIdUtility.NO_TYPE_INFO :
// Throw an exception if we have no repository ID info and
// no expectedType to work with. Otherwise, how would we
// know what to unmarshal?
if (expectedType == null) {
if (expectedTypeRepId != null) {
return expectedTypeRepId;
} else if (factory != null) {
return factory.get_id();
} else {
throw wrapper.expectedTypeNullAndNoRepId(
CompletionStatus.COMPLETED_MAYBE);
}
}
return repIdStrs.createForAnyType(expectedType);
case RepositoryIdUtility.SINGLE_REP_TYPE_INFO :
return read_repositoryId();
case RepositoryIdUtility.PARTIAL_LIST_TYPE_INFO :
return read_repositoryIds();
default:
throw wrapper.badValueTag( CompletionStatus.COMPLETED_MAYBE,
Integer.toHexString(valueTag) ) ;
}
}
OMGSystemException.java 文件源码
项目:OpenJSharp
阅读 27
收藏 0
点赞 0
评论 0
public NO_IMPLEMENT incompatibleValueImpl( CompletionStatus cs, Throwable t ) {
NO_IMPLEMENT exc = new NO_IMPLEMENT( INCOMPATIBLE_VALUE_IMPL, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "OMG.incompatibleValueImpl",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
PIHandlerImpl.java 文件源码
项目:openjdk-jdk10
阅读 21
收藏 0
点赞 0
评论 0
public void cleanupClientPIRequest() {
if( !hasClientInterceptors ) return;
if( !isClientPIEnabledForThisThread() ) return;
ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
RetryType rt = info.getRetryRequest() ;
// fix for 6763340
if (!rt.equals( RetryType.BEFORE_RESPONSE )) {
// If the replyStatus has not yet been set, this is an indication
// that the ORB threw an exception before we had a chance to
// invoke the client interceptor ending points.
//
// _REVISIT_ We cannot handle any exceptions or ForwardRequests
// flagged by the ending points here because there is no way
// to gracefully handle this in any of the calling code.
// This is a rare corner case, so we will ignore this for now.
short replyStatus = info.getReplyStatus();
if (replyStatus == info.UNINITIALIZED ) {
invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
wrapper.unknownRequestInvoke(
CompletionStatus.COMPLETED_MAYBE ) ) ;
}
}
// Decrement entry count, and if it is zero, pop it from the stack.
info.decrementEntryCount();
// fix for 6763340, and probably other cases (non-recursive retry)
if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
// RequestInfoStack<ClientRequestInfoImpl> infoStack =
// threadLocalClientRequestInfoStack.get();
RequestInfoStack infoStack =
(RequestInfoStack)threadLocalClientRequestInfoStack.get();
infoStack.pop();
printPop();
}
}
ORBUtilSystemException.java 文件源码
项目:OpenJSharp
阅读 66
收藏 0
点赞 0
评论 0
public MARSHAL badRepIdIndirection( CompletionStatus cs, Throwable t, Object arg0) {
MARSHAL exc = new MARSHAL( BAD_REP_ID_INDIRECTION, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = new Object[1] ;
parameters[0] = arg0 ;
doLog( Level.WARNING, "ORBUTIL.badRepIdIndirection",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
ORBUtilSystemException.java 文件源码
项目:OpenJSharp
阅读 24
收藏 0
点赞 0
评论 0
public INTERNAL errorResolvingAlias( CompletionStatus cs, Throwable t ) {
INTERNAL exc = new INTERNAL( ERROR_RESOLVING_ALIAS, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "ORBUTIL.errorResolvingAlias",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
ORBUtilSystemException.java 文件源码
项目:OpenJSharp
阅读 21
收藏 0
点赞 0
评论 0
public MARSHAL customWrapperIndirection( CompletionStatus cs, Throwable t ) {
MARSHAL exc = new MARSHAL( CUSTOM_WRAPPER_INDIRECTION, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "ORBUTIL.customWrapperIndirection",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
OMGSystemException.java 文件源码
项目:OpenJSharp
阅读 27
收藏 0
点赞 0
评论 0
public BAD_OPERATION operationUnknownToTarget( CompletionStatus cs, Throwable t ) {
BAD_OPERATION exc = new BAD_OPERATION( OPERATION_UNKNOWN_TO_TARGET, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "OMG.operationUnknownToTarget",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
OMGSystemException.java 文件源码
项目:OpenJSharp
阅读 23
收藏 0
点赞 0
评论 0
public BAD_INV_ORDER badPollSync( CompletionStatus cs, Throwable t ) {
BAD_INV_ORDER exc = new BAD_INV_ORDER( BAD_POLL_SYNC, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "OMG.badPollSync",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
OMGSystemException.java 文件源码
项目:OpenJSharp
阅读 26
收藏 0
点赞 0
评论 0
public BAD_PARAM ctxIllegalPropertyName( CompletionStatus cs, Throwable t ) {
BAD_PARAM exc = new BAD_PARAM( CTX_ILLEGAL_PROPERTY_NAME, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "OMG.ctxIllegalPropertyName",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
ORBUtility.java 文件源码
项目:OpenJSharp
阅读 21
收藏 0
点赞 0
评论 0
public static SystemException extractSystemException(Any any) {
InputStream in = any.create_input_stream();
ORB orb = (ORB)(in.orb());
if ( ! isSystemExceptionTypeCode(any.type(), orb)) {
throw wrapper.unknownDsiSysex(CompletionStatus.COMPLETED_MAYBE);
}
return ORBUtility.readSystemException(in);
}
OMGSystemException.java 文件源码
项目:OpenJSharp
阅读 20
收藏 0
点赞 0
评论 0
public BAD_PARAM invalidObjectId( CompletionStatus cs, Throwable t ) {
BAD_PARAM exc = new BAD_PARAM( INVALID_OBJECT_ID, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "OMG.invalidObjectId",
parameters, OMGSystemException.class, exc ) ;
}
return exc ;
}
POASystemException.java 文件源码
项目:OpenJSharp
阅读 22
收藏 0
点赞 0
评论 0
public OBJ_ADAPTER localServantLookup( CompletionStatus cs, Throwable t ) {
OBJ_ADAPTER exc = new OBJ_ADAPTER( LOCAL_SERVANT_LOOKUP, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "POA.localServantLookup",
parameters, POASystemException.class, exc ) ;
}
return exc ;
}
ORBUtilSystemException.java 文件源码
项目:OpenJSharp
阅读 24
收藏 0
点赞 0
评论 0
public INTERNAL illegalGiopMsgType( CompletionStatus cs, Throwable t ) {
INTERNAL exc = new INTERNAL( ILLEGAL_GIOP_MSG_TYPE, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "ORBUTIL.illegalGiopMsgType",
parameters, ORBUtilSystemException.class, exc ) ;
}
return exc ;
}
UtilSystemException.java 文件源码
项目:OpenJSharp
阅读 23
收藏 0
点赞 0
评论 0
public BAD_PARAM connectTieWrongOrb( CompletionStatus cs, Throwable t ) {
BAD_PARAM exc = new BAD_PARAM( CONNECT_TIE_WRONG_ORB, cs ) ;
if (t != null)
exc.initCause( t ) ;
if (logger.isLoggable( Level.WARNING )) {
Object[] parameters = null ;
doLog( Level.WARNING, "UTIL.connectTieWrongOrb",
parameters, UtilSystemException.class, exc ) ;
}
return exc ;
}
ORBUtilSystemException.java 文件源码
项目:OpenJSharp
阅读 23
收藏 0
点赞 0
评论 0
public BAD_PARAM bootstrapException( CompletionStatus cs ) {
return bootstrapException( cs, null ) ;
}
OMGSystemException.java 文件源码
项目:OpenJSharp
阅读 23
收藏 0
点赞 0
评论 0
public BAD_PARAM tcUnionBadDisc( CompletionStatus cs ) {
return tcUnionBadDisc( cs, null ) ;
}