Java Code Examples for org.omg.CORBA.CompletionStatus
The following are top voted examples for showing how to use
org.omg.CORBA.CompletionStatus. These examples are extracted from open source projects.
You can vote up the examples you like and your votes will be used in our system to generate
more good examples.
Example 1
Project: OpenJSharp File: MessageBase.java View source code | 6 votes |
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); }
Example 2
Project: openjdk-jdk10 File: MessageBase.java View source code | 6 votes |
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); } }
Example 3
Project: OpenJSharp File: CDROutputStream_1_0.java View source code | 6 votes |
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); } }
Example 4
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 5 votes |
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 ; }
Example 5
Project: OpenJSharp File: OMGSystemException.java View source code | 5 votes |
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 ; }
Example 6
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 5 votes |
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 ; }
Example 7
Project: OpenJSharp File: OMGSystemException.java View source code | 5 votes |
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 ; }
Example 8
Project: OpenJSharp File: OMGSystemException.java View source code | 5 votes |
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 ; }
Example 9
Project: OpenJSharp File: UtilSystemException.java View source code | 5 votes |
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 ; }
Example 10
Project: openjdk-jdk10 File: IDLJavaSerializationOutputStream.java View source code | 5 votes |
public final void write_any(Any any) { if (any == null) { throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE); } write_TypeCode(any.type()); any.write_value(parent); }
Example 11
Project: OpenJSharp File: OMGSystemException.java View source code | 5 votes |
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 ; }
Example 12
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 5 votes |
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 ; }
Example 13
Project: OpenJSharp File: POASystemException.java View source code | 5 votes |
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 ; }
Example 14
Project: OpenJSharp File: IDLJavaSerializationOutputStream.java View source code | 5 votes |
public final void write_any(Any any) { if (any == null) { throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE); } write_TypeCode(any.type()); any.write_value(parent); }
Example 15
Project: openjdk-jdk10 File: CDRInputStream_1_0.java View source code | 5 votes |
/** * 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) ) ; } }
Example 16
Project: OpenJSharp File: OMGSystemException.java View source code | 5 votes |
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 ; }
Example 17
Project: openjdk-jdk10 File: PIHandlerImpl.java View source code | 5 votes |
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(); } }
Example 18
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 5 votes |
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 ; }
Example 19
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 5 votes |
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 ; }
Example 20
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 5 votes |
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 ; }
Example 21
Project: OpenJSharp File: OMGSystemException.java View source code | 5 votes |
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 ; }
Example 22
Project: OpenJSharp File: OMGSystemException.java View source code | 5 votes |
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 ; }
Example 23
Project: OpenJSharp File: OMGSystemException.java View source code | 5 votes |
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 ; }
Example 24
Project: OpenJSharp File: ORBUtility.java View source code | 5 votes |
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); }
Example 25
Project: OpenJSharp File: OMGSystemException.java View source code | 5 votes |
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 ; }
Example 26
Project: OpenJSharp File: POASystemException.java View source code | 5 votes |
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 ; }
Example 27
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 5 votes |
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 ; }
Example 28
Project: OpenJSharp File: UtilSystemException.java View source code | 5 votes |
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 ; }
Example 29
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 4 votes |
public BAD_PARAM bootstrapException( CompletionStatus cs ) { return bootstrapException( cs, null ) ; }
Example 30
Project: OpenJSharp File: OMGSystemException.java View source code | 4 votes |
public BAD_PARAM tcUnionBadDisc( CompletionStatus cs ) { return tcUnionBadDisc( cs, null ) ; }
Example 31
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 4 votes |
public INTERNAL bootstrapApplicationException( Throwable t ) { return bootstrapApplicationException( CompletionStatus.COMPLETED_NO, t ) ; }
Example 32
Project: OpenJSharp File: IORSystemException.java View source code | 4 votes |
public INTERNAL nullPoa( ) { return nullPoa( CompletionStatus.COMPLETED_NO, null ) ; }
Example 33
Project: OpenJSharp File: InterceptorsSystemException.java View source code | 4 votes |
public INTERNAL objectHasNoDelegate( ) { return objectHasNoDelegate( CompletionStatus.COMPLETED_NO, null ) ; }
Example 34
Project: OpenJSharp File: OMGSystemException.java View source code | 4 votes |
public BAD_PARAM soBadAddress( ) { return soBadAddress( CompletionStatus.COMPLETED_NO, null ) ; }
Example 35
Project: OpenJSharp File: CorbaMessageMediatorImpl.java View source code | 4 votes |
protected void handleThrowableDuringServerDispatch( CorbaMessageMediator messageMediator, Throwable throwable, CompletionStatus completionStatus, int iteration) { if (iteration > 10) { if (((ORB)messageMediator.getBroker()).subcontractDebugFlag) { dprint(".handleThrowableDuringServerDispatch: " + opAndId(messageMediator) + ": cannot handle: " + throwable); } // REVISIT - should we close connection? RuntimeException rte = new RuntimeException("handleThrowableDuringServerDispatch: " + "cannot create response."); rte.initCause(throwable); throw rte; } try { if (throwable instanceof ForwardException) { ForwardException fex = (ForwardException)throwable ; createLocationForward( messageMediator, fex.getIOR(), null ) ; return; } if (throwable instanceof AddressingDispositionException) { handleAddressingDisposition( messageMediator, (AddressingDispositionException)throwable); return; } // Else. SystemException sex = convertThrowableToSystemException(throwable, completionStatus); createSystemExceptionResponse(messageMediator, sex, null); return; } catch (Throwable throwable2) { // User code (e.g., postinvoke, interceptors) may change // the exception, so we end up back here. // Report the changed exception. handleThrowableDuringServerDispatch(messageMediator, throwable2, completionStatus, iteration + 1); return; } }
Example 36
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 4 votes |
public INTERNAL workerThreadSetNameFailure( Object arg0, Object arg1, Object arg2) { return workerThreadSetNameFailure( CompletionStatus.COMPLETED_NO, null, arg0, arg1, arg2 ) ; }
Example 37
Project: OpenJSharp File: LocateReplyMessage_1_2.java View source code | 4 votes |
public void read(org.omg.CORBA.portable.InputStream istream) { super.read(istream); this.request_id = istream.read_ulong(); this.reply_status = istream.read_long(); isValidReplyStatus(this.reply_status); // raises exception on error // GIOP 1.2 LocateReply message bodies are not aligned on // 8 byte boundaries. // The code below reads the reply body in some cases // LOC_SYSTEM_EXCEPTION & OBJECT_FORWARD & OBJECT_FORWARD_PERM & // LOC_NEEDS_ADDRESSING_MODE if (this.reply_status == LOC_SYSTEM_EXCEPTION) { String reposId = istream.read_string(); this.exClassName = ORBUtility.classNameOf(reposId); this.minorCode = istream.read_long(); int status = istream.read_long(); switch (status) { case CompletionStatus._COMPLETED_YES: this.completionStatus = CompletionStatus.COMPLETED_YES; break; case CompletionStatus._COMPLETED_NO: this.completionStatus = CompletionStatus.COMPLETED_NO; break; case CompletionStatus._COMPLETED_MAYBE: this.completionStatus = CompletionStatus.COMPLETED_MAYBE; break; default: throw wrapper.badCompletionStatusInLocateReply( CompletionStatus.COMPLETED_MAYBE, new Integer(status) ); } } else if ( (this.reply_status == OBJECT_FORWARD) || (this.reply_status == OBJECT_FORWARD_PERM) ){ CDRInputStream cdr = (CDRInputStream) istream; this.ior = IORFactories.makeIOR( cdr ) ; } else if (this.reply_status == LOC_NEEDS_ADDRESSING_MODE) { // read GIOP::AddressingDisposition from body and resend the // original request using the requested addressing mode. The // resending is transparent to the caller. this.addrDisposition = AddressingDispositionHelper.read(istream); } }
Example 38
Project: OpenJSharp File: POASystemException.java View source code | 4 votes |
public INTERNAL badLocalreplystatus( ) { return badLocalreplystatus( CompletionStatus.COMPLETED_NO, null ) ; }
Example 39
Project: OpenJSharp File: ORBUtilSystemException.java View source code | 4 votes |
public INTERNAL wcharArrayUnsupportedEncoding( CompletionStatus cs ) { return wcharArrayUnsupportedEncoding( cs, null ) ; }
Example 40
Project: OpenJSharp File: OMGSystemException.java View source code | 4 votes |
public BAD_PARAM ctxIllegalSearchString( CompletionStatus cs ) { return ctxIllegalSearchString( cs, null ) ; }