Java源码示例:com.sun.corba.se.spi.logging.CORBALogDomains

示例1
public SocketFactoryContactInfoImpl(
    ORB orb,
    CorbaContactInfoList contactInfoList,
    IOR effectiveTargetIOR,
    short addressingDisposition,
    SocketInfo cookie)
{
    super(orb, contactInfoList);
    this.effectiveTargetIOR = effectiveTargetIOR;
    this.addressingDisposition = addressingDisposition;

    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    socketInfo =
        orb.getORBData().getLegacySocketFactory()
            .getEndPointInfo(orb, effectiveTargetIOR, cookie);

    socketType = socketInfo.getType();
    hostname = socketInfo.getHost();
    port = socketInfo.getPort();
}
 
示例2
public Object invoke( Object proxy, Method method, Object[] args )
    throws Throwable
{
    // Note that the declaring class in method is the interface
    // in which the method was defined, not the proxy class.
    Class cls = method.getDeclaringClass() ;
    InvocationHandler handler =
        (InvocationHandler)classToInvocationHandler.get( cls ) ;

    if (handler == null) {
        if (defaultHandler != null)
            handler = defaultHandler ;
        else {
            ORBUtilSystemException wrapper = ORBUtilSystemException.get(
                CORBALogDomains.UTIL ) ;
            throw wrapper.noInvocationHandler( "\"" + method.toString() +
                "\"" ) ;
        }
    }

    // handler should never be null here.

    return handler.invoke( proxy, method, args ) ;
}
 
示例3
public CorbaMessageMediator invoke(java.lang.Object servant,
                                   CorbaMessageMediator request,
                                   byte[] objectId,
                                   ObjectAdapter objectAdapter)
{
    ORB orb = (ORB)request.getBroker() ;
    ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.OA_INVOCATION ) ;

    if ((servant == null) || (servant instanceof NullServant)) {
        return request.getProtocolHandler().createSystemExceptionResponse(
            request, wrapper.badSkeleton(), null);
    } else {
        return request.getProtocolHandler().createSystemExceptionResponse(
            request, wrapper.getinterfaceNotImplemented(), null);
    }
}
 
示例4
public void init(org.omg.CORBA.ORB orb,
                 ByteBuffer byteBuffer,
                 int bufSize,
                 boolean littleEndian,
                 BufferManagerRead bufferManager) {
    this.orb = (ORB) orb;
    this.bufSize = bufSize;
    this.bufferManager = bufferManager;
    buffer = byteBuffer;
    wrapper =
        ORBUtilSystemException.get((ORB)orb, CORBALogDomains.RPC_ENCODING);

    byte[] buf;
    if (buffer.hasArray()) {
        buf = buffer.array();
    } else {
        buf = new byte[bufSize];
        buffer.get(buf);
    }
    // Note: at this point, the buffer position is zero. The setIndex()
    // method call can be used to set a desired read index.
    bis = new _ByteArrayInputStream(buf);
}
 
示例5
/**
 * Creates a new CodecFactory implementation.  Stores the ORB that
 * created this factory, for later use by the Codec.
 */
public CodecFactoryImpl( ORB orb ) {
    this.orb = orb;
    wrapper = ORBUtilSystemException.get(
        (com.sun.corba.se.spi.orb.ORB)orb,
        CORBALogDomains.RPC_PROTOCOL ) ;

    // Precreate a codec for version 1.0 through
    // 1.(MAX_MINOR_VERSION_SUPPORTED).  This can be
    // done since Codecs are immutable in their current implementation.
    // This is an optimization that eliminates the overhead of creating
    // a new Codec each time create_codec is called.
    for( int minor = 0; minor <= MAX_MINOR_VERSION_SUPPORTED; minor++ ) {
        codecs[minor] = new CDREncapsCodec( orb, 1, minor );
    }
}
 
示例6
public ServiceContexts( ORB orb )
{
    this.orb = orb ;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;

    addAlignmentOnWrite = false ;

    scMap = new HashMap();

    // Use the GIOP version of the ORB.  Should
    // be specified in ServiceContext.
    // See REVISIT below concerning giopVersion.
    giopVersion = orb.getORBData().getGIOPVersion();
    codeBase = null ;
}
 
示例7
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);
    }
}
 
示例8
/**
 * Creates a new ORBInitInfoImpl object (scoped to package)
 *
 * @param args The arguments passed to ORB_init.
 */
ORBInitInfoImpl( ORB orb, String[] args,
    String orbId, CodecFactory codecFactory )
{
    this.orb = orb;

    wrapper = InterceptorsSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;
    orbutilWrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;
    omgWrapper = OMGSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;

    this.args = args;
    this.orbId = orbId;
    this.codecFactory = codecFactory;
}
 
示例9
public void init(org.omg.CORBA.ORB orb,
                 ByteBuffer byteBuffer,
                 int bufSize,
                 boolean littleEndian,
                 BufferManagerRead bufferManager) {
    this.orb = (ORB) orb;
    this.bufSize = bufSize;
    this.bufferManager = bufferManager;
    buffer = byteBuffer;
    wrapper =
        ORBUtilSystemException.get((ORB)orb, CORBALogDomains.RPC_ENCODING);

    byte[] buf;
    if (buffer.hasArray()) {
        buf = buffer.array();
    } else {
        buf = new byte[bufSize];
        buffer.get(buf);
    }
    // Note: at this point, the buffer position is zero. The setIndex()
    // method call can be used to set a desired read index.
    bis = new _ByteArrayInputStream(buf);
}
 
示例10
/**
 * Create a naming context servant.
 * Runs the super constructor.
 * @param orb an ORB object.
 * @param objKey as String
 * @param TheNameService as NameService
 * @param TheServantManagerImpl as ServantManagerImpl
 * @exception java.lang.Exception a Java exception.
 */

public NamingContextImpl(ORB orb, String objKey,
    NameService theNameService, ServantManagerImpl theServantManagerImpl  )
    throws Exception
{
    super();

    this.orb = orb;
    readWrapper = NamingSystemException.get( orb,
        CORBALogDomains.NAMING_READ ) ;
    updateWrapper = NamingSystemException.get( orb,
        CORBALogDomains.NAMING_UPDATE ) ;

    debug = true ; // orb.namingDebugFlag ;
    this.objKey = objKey;
    theNameServiceHandle = theNameService;
    theServantManagerImplHandle = theServantManagerImpl;
    insImpl =
        new com.sun.corba.se.impl.naming.cosnaming.InterOperableNamingImpl();
}
 
示例11
public CDROutputStream(ORB orb,
                       GIOPVersion version,
                       byte encodingVersion,
                       boolean littleEndian,
                       BufferManagerWrite bufferManager,
                       byte streamFormatVersion,
                       boolean usePooledByteBuffers)
{
    impl = OutputStreamFactory.newOutputStream(orb, version,
                                               encodingVersion);
    impl.init(orb, littleEndian, bufferManager,
              streamFormatVersion, usePooledByteBuffers);

    impl.setParent(this);
    this.orb = orb ;
    this.wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_ENCODING ) ;
}
 
示例12
/**
 * NOTE:  size passed to init means buffer size
 */
public void init(org.omg.CORBA.ORB orb,
                 ByteBuffer byteBuffer,
                 int size,
                 boolean littleEndian,
                 BufferManagerRead bufferManager)
{
    this.orb = (ORB)orb;
    this.wrapper = ORBUtilSystemException.get( (ORB)orb,
        CORBALogDomains.RPC_ENCODING ) ;
    this.omgWrapper = OMGSystemException.get( (ORB)orb,
        CORBALogDomains.RPC_ENCODING ) ;
    this.littleEndian = littleEndian;
    this.bufferManagerRead = bufferManager;
    this.bbwi = new ByteBufferWithInfo(orb,byteBuffer,0);
    this.bbwi.buflen = size;
    this.bbwi.byteBuffer.limit(bbwi.buflen);
    this.markAndResetHandler = bufferManagerRead.getMarkAndResetHandler();

    debug = ((ORB)orb).transportDebugFlag;
}
 
示例13
/**
 * Creates a new ORBInitInfoImpl object (scoped to package)
 *
 * @param args The arguments passed to ORB_init.
 */
ORBInitInfoImpl( ORB orb, String[] args,
    String orbId, CodecFactory codecFactory )
{
    this.orb = orb;

    wrapper = InterceptorsSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;
    orbutilWrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;
    omgWrapper = OMGSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;

    this.args = args;
    this.orbId = orbId;
    this.codecFactory = codecFactory;
}
 
示例14
/**
 * Creates a new CodecFactory implementation.  Stores the ORB that
 * created this factory, for later use by the Codec.
 */
public CodecFactoryImpl( ORB orb ) {
    this.orb = orb;
    wrapper = ORBUtilSystemException.get(
        (com.sun.corba.se.spi.orb.ORB)orb,
        CORBALogDomains.RPC_PROTOCOL ) ;

    // Precreate a codec for version 1.0 through
    // 1.(MAX_MINOR_VERSION_SUPPORTED).  This can be
    // done since Codecs are immutable in their current implementation.
    // This is an optimization that eliminates the overhead of creating
    // a new Codec each time create_codec is called.
    for( int minor = 0; minor <= MAX_MINOR_VERSION_SUPPORTED; minor++ ) {
        codecs[minor] = new CDREncapsCodec( orb, 1, minor );
    }
}
 
示例15
/**
 * Creates a new CodecFactory implementation.  Stores the ORB that
 * created this factory, for later use by the Codec.
 */
public CodecFactoryImpl( ORB orb ) {
    this.orb = orb;
    wrapper = ORBUtilSystemException.get(
        (com.sun.corba.se.spi.orb.ORB)orb,
        CORBALogDomains.RPC_PROTOCOL ) ;

    // Precreate a codec for version 1.0 through
    // 1.(MAX_MINOR_VERSION_SUPPORTED).  This can be
    // done since Codecs are immutable in their current implementation.
    // This is an optimization that eliminates the overhead of creating
    // a new Codec each time create_codec is called.
    for( int minor = 0; minor <= MAX_MINOR_VERSION_SUPPORTED; minor++ ) {
        codecs[minor] = new CDREncapsCodec( orb, 1, minor );
    }
}
 
示例16
public SocketFactoryContactInfoImpl(
    ORB orb,
    CorbaContactInfoList contactInfoList,
    IOR effectiveTargetIOR,
    short addressingDisposition,
    SocketInfo cookie)
{
    super(orb, contactInfoList);
    this.effectiveTargetIOR = effectiveTargetIOR;
    this.addressingDisposition = addressingDisposition;

    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    socketInfo =
        orb.getORBData().getLegacySocketFactory()
            .getEndPointInfo(orb, effectiveTargetIOR, cookie);

    socketType = socketInfo.getType();
    hostname = socketInfo.getHost();
    port = socketInfo.getPort();
}
 
示例17
public SocketFactoryContactInfoImpl(
    ORB orb,
    CorbaContactInfoList contactInfoList,
    IOR effectiveTargetIOR,
    short addressingDisposition,
    SocketInfo cookie)
{
    super(orb, contactInfoList);
    this.effectiveTargetIOR = effectiveTargetIOR;
    this.addressingDisposition = addressingDisposition;

    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    socketInfo =
        orb.getORBData().getLegacySocketFactory()
            .getEndPointInfo(orb, effectiveTargetIOR, cookie);

    socketType = socketInfo.getType();
    hostname = socketInfo.getHost();
    port = socketInfo.getPort();
}
 
示例18
public void configure( DataCollector collector, ORB orb )
{
    ORB theOrb = orb ;
    wrapper = ORBUtilSystemException.get( orb, CORBALogDomains.ORB_LIFECYCLE ) ;

    initObjectCopiers( theOrb ) ;
    initIORFinders( theOrb ) ;

    theOrb.setClientDelegateFactory(
        // REVISIT: this should be ProtocolDefault.
        TransportDefault.makeClientDelegateFactory( theOrb )) ;

    initializeTransport(theOrb) ;

    initializeNaming( theOrb ) ;
    initServiceContextRegistry( theOrb ) ;
    initRequestDispatcherRegistry( theOrb ) ;
    registerInitialReferences( theOrb ) ;

    persistentServerInitialization( theOrb ) ;

    runUserConfigurators( collector, theOrb ) ;
}
 
示例19
public static CDRInputStreamBase newInputStream(
        ORB orb, GIOPVersion version, byte encodingVersion) {
    switch(version.intValue()) {
        case GIOPVersion.VERSION_1_0:
            return new CDRInputStream_1_0();
        case GIOPVersion.VERSION_1_1:
            return new CDRInputStream_1_1();
        case GIOPVersion.VERSION_1_2:
            if (encodingVersion != Message.CDR_ENC_VERSION) {
                return
                  new IDLJavaSerializationInputStream(encodingVersion);
            }
            return new CDRInputStream_1_2();
            // else fall through and report exception.
        default:
            ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
                CORBALogDomains.RPC_ENCODING ) ;
            throw wrapper.unsupportedGiopVersion( version ) ;
    }
}
 
示例20
public ContextImpl(org.omg.CORBA.ORB orb)
{
    _orb = orb;
    wrapper = ORBUtilSystemException.get(
        (com.sun.corba.se.spi.orb.ORB)orb,
        CORBALogDomains.RPC_PRESENTATION ) ;
}
 
示例21
public SelectorImpl(ORB orb)
{
    this.orb = orb;
    selector = null;
    selectorStarted = false;
    timeout = 60000;
    deferredRegistrations = new ArrayList();
    interestOpsList = new ArrayList();
    listenerThreads = new HashMap();
    readerThreads = java.util.Collections.synchronizedMap(new HashMap());
    closed = false;
    wrapper = ORBUtilSystemException.get(orb,CORBALogDomains.RPC_TRANSPORT);
}
 
示例22
/**
 * PICurrent constructor which will be called for every ORB
 * initialization.
 */
PICurrent( ORB myORB ) {
    this.myORB = myORB;
    wrapper = OMGSystemException.get( myORB,
        CORBALogDomains.RPC_PROTOCOL ) ;
    this.orbInitializing = true;
    slotCounter = 0;
}
 
示例23
public ContextImpl(org.omg.CORBA.ORB orb)
{
    _orb = orb;
    wrapper = ORBUtilSystemException.get(
        (com.sun.corba.se.spi.orb.ORB)orb,
        CORBALogDomains.RPC_PRESENTATION ) ;
}
 
示例24
public static void isValidReplyStatus(int replyStatus) {
    switch (replyStatus) {
    case UNKNOWN_OBJECT :
    case OBJECT_HERE :
    case OBJECT_FORWARD :
        break;
    default :
        ORBUtilSystemException localWrapper = ORBUtilSystemException.get(
            CORBALogDomains.RPC_PROTOCOL ) ;
        throw localWrapper.illegalReplyStatus( CompletionStatus.COMPLETED_MAYBE);
    }
}
 
示例25
LocateReplyMessage_1_2(ORB orb, int _request_id,
        int _reply_status, IOR _ior) {
    super(Message.GIOPBigMagic, GIOPVersion.V1_2, FLAG_NO_FRAG_BIG_ENDIAN,
        Message.GIOPLocateReply, 0);
    this.orb = orb;
    this.wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;
    request_id = _request_id;
    reply_status = _reply_status;
    ior = _ior;
}
 
示例26
/**
 * PICurrent constructor which will be called for every ORB
 * initialization.
 */
PICurrent( ORB myORB ) {
    this.myORB = myORB;
    wrapper = OMGSystemException.get( myORB,
        CORBALogDomains.RPC_PROTOCOL ) ;
    this.orbInitializing = true;
    slotCounter = 0;
}
 
示例27
private static Logger getCORBALogger( String ORBId, String domain )
{
    String fqLogDomain = CORBALogDomains.TOP_LEVEL_DOMAIN + "." +
        ORBId + "." + domain;

    return Logger.getLogger( fqLogDomain, ORBConstants.LOG_RESOURCE_FILE );
}
 
示例28
RequestMessage_1_2(ORB orb, int _request_id, byte _response_flags,
        byte[] _reserved, TargetAddress _target,
        String _operation, ServiceContexts _service_contexts) {
    super(Message.GIOPBigMagic, GIOPVersion.V1_2, FLAG_NO_FRAG_BIG_ENDIAN,
        Message.GIOPRequest, 0);
    this.orb = orb;
    this.wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;
    request_id = _request_id;
    response_flags = _response_flags;
    reserved = _reserved;
    target = _target;
    operation = _operation;
    service_contexts = _service_contexts;
}
 
示例29
public ObjectKeyTemplateBase( ORB orb, int magic, int scid, int serverid,
    String orbid, ObjectAdapterId oaid )
{
    this.orb = orb ;
    this.wrapper = IORSystemException.get( orb,
        CORBALogDomains.OA_IOR ) ;
    this.magic = magic ;
    this.scid = scid ;
    this.serverid = serverid ;
    this.orbid = orbid ;
    this.oaid = oaid ;

    adapterId = computeAdapterId() ;
}
 
示例30
public EncapsInputStream(org.omg.CORBA.ORB orb, byte[] buf,
                         int size, boolean littleEndian,
                         GIOPVersion version) {
    super(orb, ByteBuffer.wrap(buf), size, littleEndian,
          version, Message.CDR_ENC_VERSION,
          BufferManagerFactory.newBufferManagerRead(
                                  BufferManagerFactory.GROW,
                                  Message.CDR_ENC_VERSION,
                                  (ORB)orb));

    wrapper = ORBUtilSystemException.get( (ORB)orb,
        CORBALogDomains.RPC_ENCODING ) ;

    performORBVersionSpecificInit();
}