org.omg.CORBA.INTERNAL Java Examples

The following examples show how to use org.omg.CORBA.INTERNAL. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BufferManagerFactory.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public static BufferManagerWrite newBufferManagerWrite(
        int strategy, byte encodingVersion, ORB orb) {
    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerWrite");
        }
        return new BufferManagerWriteGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerWriteGrow(orb);
        case BufferManagerFactory.COLLECT:
            return new BufferManagerWriteCollect(orb);
        case BufferManagerFactory.STREAM:
            return new BufferManagerWriteStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager write strategy: "
                               + strategy);
    }
}
 
Example #2
Source File: UtilSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public INTERNAL errorSetLongField( CompletionStatus cs, Throwable t, Object arg0, Object arg1, Object arg2) {
    INTERNAL exc = new INTERNAL( ERROR_SET_LONG_FIELD, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[3] ;
        parameters[0] = arg0 ;
        parameters[1] = arg1 ;
        parameters[2] = arg2 ;
        doLog( Level.WARNING, "UTIL.errorSetLongField",
            parameters, UtilSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #3
Source File: UtilSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public INTERNAL errorSetByteField( CompletionStatus cs, Throwable t, Object arg0, Object arg1, Object arg2) {
    INTERNAL exc = new INTERNAL( ERROR_SET_BYTE_FIELD, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[3] ;
        parameters[0] = arg0 ;
        parameters[1] = arg1 ;
        parameters[2] = arg2 ;
        doLog( Level.WARNING, "UTIL.errorSetByteField",
            parameters, UtilSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #4
Source File: UtilSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public INTERNAL errorSetCharField( CompletionStatus cs, Throwable t, Object arg0, Object arg1, Object arg2) {
    INTERNAL exc = new INTERNAL( ERROR_SET_CHAR_FIELD, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[3] ;
        parameters[0] = arg0 ;
        parameters[1] = arg1 ;
        parameters[2] = arg2 ;
        doLog( Level.WARNING, "UTIL.errorSetCharField",
            parameters, UtilSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #5
Source File: BufferManagerFactory.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #6
Source File: NamingSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL transNcNewctxGotExc( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( TRANS_NC_NEWCTX_GOT_EXC, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.transNcNewctxGotExc",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #7
Source File: InterceptorsSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL exceptionUnavailable( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( EXCEPTION_UNAVAILABLE, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "INTERCEPTORS.exceptionUnavailable",
            parameters, InterceptorsSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #8
Source File: IORSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL nullPoa( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( NULL_POA, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "IOR.nullPoa",
            parameters, IORSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #9
Source File: POASystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL makeFactoryNotPoa( CompletionStatus cs, Throwable t, Object arg0) {
    INTERNAL exc = new INTERNAL( MAKE_FACTORY_NOT_POA, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[1] ;
        parameters[0] = arg0 ;
        doLog( Level.WARNING, "POA.makeFactoryNotPoa",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #10
Source File: POASystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL invokesetup( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( INVOKESETUP, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.invokesetup",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #11
Source File: POASystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL preinvokePoaDestroyed( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( PREINVOKE_POA_DESTROYED, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.preinvokePoaDestroyed",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #12
Source File: NamingSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL insOther( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( INS_OTHER, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.insOther",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #13
Source File: POASystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL poaInternalGetServantError( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( POA_INTERNAL_GET_SERVANT_ERROR, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.poaInternalGetServantError",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #14
Source File: POASystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL policyMediatorBadPolicyInFactory( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( POLICY_MEDIATOR_BAD_POLICY_IN_FACTORY, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.policyMediatorBadPolicyInFactory",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #15
Source File: NamingSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL namingCtxResolveCannotNarrowToCtx( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( NAMING_CTX_RESOLVE_CANNOT_NARROW_TO_CTX, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.namingCtxResolveCannotNarrowToCtx",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #16
Source File: NamingSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL insBadSchemeSpecificPart( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( INS_BAD_SCHEME_SPECIFIC_PART, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.insBadSchemeSpecificPart",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #17
Source File: LegacyServerSocketManagerImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #18
Source File: InterceptorsSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL cantPopOnlyPicurrent( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( CANT_POP_ONLY_PICURRENT, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "INTERCEPTORS.cantPopOnlyPicurrent",
            parameters, InterceptorsSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #19
Source File: NamingSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL namingCtxBadBindingtype( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( NAMING_CTX_BAD_BINDINGTYPE, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.namingCtxBadBindingtype",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #20
Source File: POASystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL servantDispatch( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( SERVANT_DISPATCH, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.servantDispatch",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #21
Source File: POASystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL pmfCreateRetain( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( PMF_CREATE_RETAIN, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.pmfCreateRetain",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #22
Source File: PersistentBindingIterator.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
* Destroys this BindingIterator by disconnecting from the ORB
* @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions.
*/
 final public void Destroy()
 {
     // Remove the object from the Active Object Map.
     try {
         byte[] objectId = biPOA.servant_to_id( this );
         if( objectId != null ) {
             biPOA.deactivate_object( objectId );
         }
     }
     catch( Exception e ) {
         throw new INTERNAL( "Exception in BindingIterator.Destroy " + e );
     }
 }
 
Example #23
Source File: OMGSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL xaRmfail( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( XA_RMFAIL, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.xaRmfail",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #24
Source File: NamingSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL namingCtxRebindAlreadyBound( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( NAMING_CTX_REBIND_ALREADY_BOUND, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.namingCtxRebindAlreadyBound",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #25
Source File: ActivationSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public INTERNAL serverNotRunning( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( SERVER_NOT_RUNNING, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "ACTIVATION.serverNotRunning",
            parameters, ActivationSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #26
Source File: LegacyServerSocketManagerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #27
Source File: POASystemException.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public INTERNAL servantToIdOaa(  ) {
    return servantToIdOaa( CompletionStatus.COMPLETED_NO, null  ) ;
}
 
Example #28
Source File: InterceptorsSystemException.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public INTERNAL piDiiResultIsNull(  ) {
    return piDiiResultIsNull( CompletionStatus.COMPLETED_NO, null  ) ;
}
 
Example #29
Source File: ORBUtility.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/** This method obtains an IOR from a CORBA object reference.
* It will return null if obj is a local object, a null object,
* or an object implemented by a different ORB.  It will
* throw BAD_OPERATION if obj is an unconnected RMI-IIOP object.
* @return IOR the IOR that represents this objref.  This will
* never be null.
* @exception BAD_OPERATION (from oi._get_delegate) if obj is a
* normal objref, but does not have a delegate set.
* @exception BAD_PARAM if obj is a local object, or else was
* created by a foreign ORB.
*/
public static IOR getIOR( org.omg.CORBA.Object obj )
{
    if (obj == null)
        throw wrapper.nullObjectReference() ;

    IOR ior = null ;
    if (StubAdapter.isStub(obj)) {
        org.omg.CORBA.portable.Delegate del = StubAdapter.getDelegate(
            obj ) ;

        if (del instanceof CorbaClientDelegate) {
            CorbaClientDelegate cdel = (CorbaClientDelegate)del ;
            ContactInfoList cil = cdel.getContactInfoList() ;

            if (cil instanceof CorbaContactInfoList) {
                CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
                ior = ccil.getTargetIOR() ;
                if (ior == null)
                    throw wrapper.nullIor() ;

                return ior ;
            } else {
                // This is our code, but the ContactInfoList is not a
                // CorbaContactInfoList.  This should not happen, because
                // we are in the CORBA application of the DCSA framework.
                // This is a coding error, and thus an INTERNAL exception
                // should be thrown.
                // XXX needs minor code
                throw new INTERNAL() ;
            }
        }

        // obj is implemented by a foreign ORB, because the Delegate is not a
        // ClientDelegate.
        // XXX this case could be handled by marshalling and
        // unmarshalling.  However, object_to_string cannot be used
        // here, as it is implemented with getIOR.  Note that this
        // will require access to an ORB, so that we can create streams
        // as needed.  The ORB is available simply as io._orb().
        throw wrapper.objrefFromForeignOrb() ;
    } else
        throw wrapper.localObjectNotAllowed() ;
}
 
Example #30
Source File: POASystemException.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public INTERNAL poaInternalGetServantError( Throwable t ) {
    return poaInternalGetServantError( CompletionStatus.COMPLETED_NO, t  ) ;
}