Java Code Examples for com.sun.corba.se.spi.logging.CORBALogDomains

The following are top voted examples for showing how to use com.sun.corba.se.spi.logging.CORBALogDomains. 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: openjdk-jdk10   File: CDROutputStream_1_0.java   View source code 6 votes vote down vote up
public void init(org.omg.CORBA.ORB orb,
                    boolean littleEndian,
                    BufferManagerWrite bufferManager,
                    byte streamFormatVersion,
                    boolean usePooledByteBuffers)
{
    // ORB must not be null.  See CDROutputStream constructor.
    this.orb = (ORB)orb;
    this.wrapper = ORBUtilSystemException.get( this.orb,
        CORBALogDomains.RPC_ENCODING ) ;
    debug = this.orb.transportDebugFlag;

    this.littleEndian = littleEndian;
    this.bufferManagerWrite = bufferManager;
    this.bbwi = new ByteBufferWithInfo(orb, bufferManager, usePooledByteBuffers);
    this.streamFormatVersion = streamFormatVersion;

    createRepositoryIdHandlers();
}
 
Example 2
Project: OpenJSharp   File: SpecialMethod.java   View source code 6 votes vote down vote up
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);
    }
}
 
Example 3
Project: openjdk-jdk10   File: CDROutputStream.java   View source code 6 votes vote down vote up
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 ) ;
}
 
Example 4
Project: openjdk-jdk10   File: NamingContextImpl.java   View source code 6 votes vote down vote up
/**
 * 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();
}
 
Example 5
Project: OpenJSharp   File: SocketFactoryContactInfoImpl.java   View source code 6 votes vote down vote up
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();
}
 
Example 6
Project: openjdk-jdk10   File: IDLJavaSerializationInputStream.java   View source code 6 votes vote down vote up
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);
}
 
Example 7
Project: OpenJSharp   File: TransientNamingContext.java   View source code 6 votes vote down vote up
/**
 * Constructs a new TransientNamingContext object.
 * @param orb an orb object.
 * @param initial the initial naming context.
 * @exception Exception a Java exception thrown of the base class cannot
 * initialize.
 */
public TransientNamingContext(com.sun.corba.se.spi.orb.ORB orb,
    org.omg.CORBA.Object initial,
    POA nsPOA )
    throws java.lang.Exception
{
    super(orb, nsPOA );
    wrapper = NamingSystemException.get( orb, CORBALogDomains.NAMING ) ;

    this.localRoot = initial;
    readLogger = orb.getLogger( CORBALogDomains.NAMING_READ);
    updateLogger = orb.getLogger( CORBALogDomains.NAMING_UPDATE);
    lifecycleLogger = orb.getLogger(
        CORBALogDomains.NAMING_LIFECYCLE);
    lifecycleLogger.fine( "Root TransientNamingContext LIFECYCLE.CREATED" );
}
 
Example 8
Project: OpenJSharp   File: NamingContextImpl.java   View source code 6 votes vote down vote up
/**
 * 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();
}
 
Example 9
Project: openjdk-jdk10   File: SocketFactoryContactInfoImpl.java   View source code 6 votes vote down vote up
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();
}
 
Example 10
Project: openjdk-jdk10   File: ORBInitInfoImpl.java   View source code 6 votes vote down vote up
/**
 * 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;
}
 
Example 11
Project: openjdk-jdk10   File: ORBConfiguratorImpl.java   View source code 6 votes vote down vote up
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 ) ;
}
 
Example 12
Project: OpenJSharp   File: CDROutputStream.java   View source code 6 votes vote down vote up
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 ) ;
}
 
Example 13
Project: OpenJSharp   File: IDLJavaSerializationInputStream.java   View source code 6 votes vote down vote up
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);
}
 
Example 14
Project: OpenJSharp   File: CDROutputObject.java   View source code 6 votes vote down vote up
private CDROutputObject(
    ORB orb, GIOPVersion giopVersion, Message header,
    BufferManagerWrite manager, byte streamFormatVersion,
    CorbaMessageMediator mediator)
{
    super(orb, giopVersion, header.getEncodingVersion(),
          false, manager, streamFormatVersion,
          ((mediator != null && mediator.getConnection() != null) ?
           ((CorbaConnection)mediator.getConnection()).
                 shouldUseDirectByteBuffers() : false));

    this.header = header;
    this.orb = orb;
    this.wrapper = ORBUtilSystemException.get( orb, CORBALogDomains.RPC_ENCODING ) ;
    this.omgWrapper = OMGSystemException.get( orb, CORBALogDomains.RPC_ENCODING ) ;

    getBufferManager().setOutputObject(this);
    this.corbaMessageMediator = mediator;
}
 
Example 15
Project: OpenJSharp   File: BufferManagerFactory.java   View source code 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 16
Project: OpenJSharp   File: CDRInputStream_1_0.java   View source code 6 votes vote down vote up
/**
 * 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;
}
 
Example 17
Project: openjdk-jdk10   File: RequestMessage_1_1.java   View source code 6 votes vote down vote up
RequestMessage_1_1(ORB orb, ServiceContexts _service_contexts,
        int _request_id, boolean _response_expected, byte[] _reserved,
        byte[] _object_key, String _operation,
        Principal _requesting_principal) {
    super(Message.GIOPBigMagic, GIOPVersion.V1_1, FLAG_NO_FRAG_BIG_ENDIAN,
        Message.GIOPRequest, 0);
    this.orb = orb;
    this.wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;
    service_contexts = _service_contexts;
    request_id = _request_id;
    response_expected = _response_expected;
    reserved = _reserved;
    object_key = _object_key;
    operation = _operation;
    requesting_principal = _requesting_principal;
}
 
Example 18
Project: openjdk-jdk10   File: TransientNamingContext.java   View source code 6 votes vote down vote up
/**
 * Constructs a new TransientNamingContext object.
 * @param orb an orb object.
 * @param initial the initial naming context.
 * @exception Exception a Java exception thrown of the base class cannot
 * initialize.
 */
public TransientNamingContext(com.sun.corba.se.spi.orb.ORB orb,
    org.omg.CORBA.Object initial,
    POA nsPOA )
    throws java.lang.Exception
{
    super(orb, nsPOA );
    wrapper = NamingSystemException.get( orb, CORBALogDomains.NAMING ) ;

    this.localRoot = initial;
    readLogger = orb.getLogger( CORBALogDomains.NAMING_READ);
    updateLogger = orb.getLogger( CORBALogDomains.NAMING_UPDATE);
    lifecycleLogger = orb.getLogger(
        CORBALogDomains.NAMING_LIFECYCLE);
    lifecycleLogger.fine( "Root TransientNamingContext LIFECYCLE.CREATED" );
}
 
Example 19
Project: OpenJSharp   File: ORBInitInfoImpl.java   View source code 6 votes vote down vote up
/**
 * 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;
}
 
Example 20
Project: openjdk-jdk10   File: SpecialMethod.java   View source code 6 votes vote down vote up
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);
    }
}
 
Example 21
Project: OpenJSharp   File: CodecFactoryImpl.java   View source code 6 votes vote down vote up
/**
 * 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 );
    }
}
 
Example 22
Project: OpenJSharp   File: ObjectAdapterBase.java   View source code 5 votes vote down vote up
public ObjectAdapterBase( ORB orb )
{
    this.orb = orb ;
    _iorWrapper = POASystemException.get( orb,
        CORBALogDomains.OA_IOR ) ;
    _lifecycleWrapper = POASystemException.get( orb,
        CORBALogDomains.OA_LIFECYCLE ) ;
    _omgLifecycleWrapper = OMGSystemException.get( orb,
        CORBALogDomains.OA_LIFECYCLE ) ;
    _invocationWrapper = POASystemException.get( orb,
        CORBALogDomains.OA_INVOCATION ) ;
    _omgInvocationWrapper = OMGSystemException.get( orb,
        CORBALogDomains.OA_INVOCATION ) ;
}
 
Example 23
Project: openjdk-jdk10   File: NamingContextImpl.java   View source code 5 votes vote down vote up
/**
 * Create a naming context servant.
 * Runs the super constructor.
 * @param orb an ORB object.
 * @exception java.lang.Exception a Java exception.
 */
public NamingContextImpl(ORB orb, POA poa) throws java.lang.Exception {
    super();
    this.orb = orb;
    wrapper = NamingSystemException.get( orb,
        CORBALogDomains.NAMING_UPDATE ) ;

    insImpl = new InterOperableNamingImpl( );
    this.nsPOA = poa;
    readLogger = orb.getLogger( CORBALogDomains.NAMING_READ);
    updateLogger = orb.getLogger( CORBALogDomains.NAMING_UPDATE);
    lifecycleLogger = orb.getLogger(
        CORBALogDomains.NAMING_LIFECYCLE);
}
 
Example 24
Project: OpenJSharp   File: ORB.java   View source code 5 votes vote down vote up
private static Logger getCORBALogger( String ORBId, String domain )
{
    String fqLogDomain = CORBALogDomains.TOP_LEVEL_DOMAIN + "." +
        ORBId + "." + domain;

    return Logger.getLogger( fqLogDomain, ORBConstants.LOG_RESOURCE_FILE );
}
 
Example 25
Project: openjdk-jdk10   File: ReplyMessage_1_2.java   View source code 5 votes vote down vote up
ReplyMessage_1_2(ORB orb, int _request_id, int _reply_status,
        ServiceContexts _service_contexts, IOR _ior) {
    super(Message.GIOPBigMagic, GIOPVersion.V1_2, FLAG_NO_FRAG_BIG_ENDIAN,
        Message.GIOPReply, 0);
    this.orb = orb;
    this.wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;
    request_id = _request_id;
    reply_status = _reply_status;
    service_contexts = _service_contexts;
    ior = _ior;
}
 
Example 26
Project: OpenJSharp   File: OperationFactory.java   View source code 5 votes vote down vote up
public Object operate( Object value )
{
    String val = (String)value ;
    try {
        return new URL( val ) ;
    } catch (MalformedURLException exc) {
        ORBUtilSystemException wrapper = ORBUtilSystemException.get(
            CORBALogDomains.ORB_LIFECYCLE ) ;
        throw wrapper.badUrl( exc, val ) ;
    }
}
 
Example 27
Project: openjdk-jdk10   File: IORImpl.java   View source code 5 votes vote down vote up
public IORImpl( ORB orb, String typeid )
{
    factory = orb ;
    wrapper = IORSystemException.get( orb,
        CORBALogDomains.OA_IOR ) ;
    this.typeId = typeid ;
}
 
Example 28
Project: OpenJSharp   File: ContextImpl.java   View source code 5 votes vote down vote up
public ContextImpl(org.omg.CORBA.ORB orb)
{
    _orb = orb;
    wrapper = ORBUtilSystemException.get(
        (com.sun.corba.se.spi.orb.ORB)orb,
        CORBALogDomains.RPC_PRESENTATION ) ;
}
 
Example 29
Project: OpenJSharp   File: AnyImpl.java   View source code 5 votes vote down vote up
/**
 * A constructor that sets the Any to contain a null. It also marks
 * the value as being invalid so that extractions throw an exception
 * until an insertion has been performed.
 */
public AnyImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( (com.sun.corba.se.spi.orb.ORB)orb,
        CORBALogDomains.RPC_PRESENTATION ) ;

    typeCode = orb.get_primitive_tc(TCKind._tk_null);
    stream = null;
    object = null;
    value = 0;
    // null is a valid value
    isInitialized = true;
}
 
Example 30
Project: openjdk-jdk10   File: TypeCodeImpl.java   View source code 5 votes vote down vote up
public TypeCodeImpl(ORB orb)
{
    // initialized to tk_null
    _orb = orb;
    wrapper = ORBUtilSystemException.get(
        (com.sun.corba.se.spi.orb.ORB)orb, CORBALogDomains.RPC_PRESENTATION ) ;
}
 
Example 31
Project: openjdk-jdk10   File: ORBDataParserImpl.java   View source code 5 votes vote down vote up
public ORBDataParserImpl( ORB orb, DataCollector coll )
{
    super( ParserTable.get().getParserData() ) ;
    this.orb = orb ;
    wrapper = ORBUtilSystemException.get( orb, CORBALogDomains.ORB_LIFECYCLE ) ;
    init( coll ) ;
    complete() ;
}
 
Example 32
Project: OpenJSharp   File: SpecialMethod.java   View source code 5 votes vote down vote up
public CorbaMessageMediator invoke(java.lang.Object servant,
                                   CorbaMessageMediator request,
                                   byte[] objectId,
                                   ObjectAdapter objectAdapter)
{
    if ((servant == null) || (servant instanceof NullServant)) {
        ORB orb = (ORB)request.getBroker() ;
        ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
            CORBALogDomains.OA_INVOCATION ) ;

        return request.getProtocolHandler().createSystemExceptionResponse(
            request, wrapper.badSkeleton(), null);
    }

    String[] ids = objectAdapter.getInterfaces( servant, objectId );
    String clientId =
        ((InputStream)request.getInputObject()).read_string();
    boolean answer = false;
    for(int i = 0; i < ids.length; i++)
        if (ids[i].equals(clientId)) {
            answer = true;
            break;
        }

    CorbaMessageMediator response =
        request.getProtocolHandler().createResponse(request, null);
    ((OutputStream)response.getOutputObject()).write_boolean(answer);
    return response;
}
 
Example 33
Project: OpenJSharp   File: CorbaClientDelegateImpl.java   View source code 5 votes vote down vote up
public CorbaClientDelegateImpl(ORB orb,
                               CorbaContactInfoList contactInfoList)
{
    this.orb = orb;
    this.wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_PROTOCOL ) ;
    this.contactInfoList = contactInfoList;
}
 
Example 34
Project: openjdk-jdk10   File: LocateReplyMessage_1_1.java   View source code 5 votes vote down vote up
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);
    }
}
 
Example 35
Project: openjdk-jdk10   File: AnyImpl.java   View source code 5 votes vote down vote up
/**
 * A constructor that sets the Any to contain a null. It also marks
 * the value as being invalid so that extractions throw an exception
 * until an insertion has been performed.
 */
public AnyImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( (com.sun.corba.se.spi.orb.ORB)orb,
        CORBALogDomains.RPC_PRESENTATION ) ;

    typeCode = orb.get_primitive_tc(TCKind._tk_null);
    stream = null;
    object = null;
    value = 0;
    // null is a valid value
    isInitialized = true;
}
 
Example 36
Project: openjdk-jdk10   File: BufferManagerReadStream.java   View source code 5 votes vote down vote up
BufferManagerReadStream( ORB orb )
{
    this.orb = orb ;
    this.wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_ENCODING ) ;
    debug = orb.transportDebugFlag;
}
 
Example 37
Project: openjdk-jdk10   File: CorbaConnectionCacheBase.java   View source code 5 votes vote down vote up
protected CorbaConnectionCacheBase(ORB orb, String cacheType,
                                   String monitoringName)
{
    this.orb = orb;
    this.cacheType = cacheType;
    this.monitoringName = monitoringName;
    wrapper =ORBUtilSystemException.get(orb,CORBALogDomains.RPC_TRANSPORT);
    registerWithMonitoring();
    dprintCreation();
}
 
Example 38
Project: openjdk-jdk10   File: POAFactory.java   View source code 5 votes vote down vote up
public void init( ORB orb )
{
    this.orb = orb ;
    wrapper = POASystemException.get( orb,
        CORBALogDomains.OA_LIFECYCLE ) ;
    omgWrapper = OMGSystemException.get( orb,
        CORBALogDomains.OA_LIFECYCLE ) ;
    delegateImpl = new DelegateImpl( orb, this ) ;
    registerRootPOA() ;

    POACurrent poaCurrent = new POACurrent(orb);
    orb.getLocalResolver().register( ORBConstants.POA_CURRENT_NAME,
        ClosureFactory.makeConstant( poaCurrent ) ) ;
}
 
Example 39
Project: OpenJSharp   File: ReplyMessage_1_0.java   View source code 5 votes vote down vote up
public static void isValidReplyStatus(int replyStatus) {
    switch (replyStatus) {
    case NO_EXCEPTION :
    case USER_EXCEPTION :
    case SYSTEM_EXCEPTION :
    case LOCATION_FORWARD :
        break;
    default :
        ORBUtilSystemException localWrapper = ORBUtilSystemException.get(
            CORBALogDomains.RPC_PROTOCOL ) ;
        throw localWrapper.illegalReplyStatus( CompletionStatus.COMPLETED_MAYBE);
    }
}
 
Example 40
Project: OpenJSharp   File: LocateReplyMessage_1_0.java   View source code 5 votes vote down vote up
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);
    }
}