private CodeSetComponentInfo.CodeSetContext getCodeSets() { if (getConnection() == null) return CodeSetComponentInfo.LOCAL_CODE_SETS; else return getConnection().getCodeSetContext(); }
public final CodeBase getCodeBase() { if (getConnection() == null) return null; else return getConnection().getCodeBase(); }
private boolean isLocal() { boolean result = false; Delegate delegate = StubAdapter.getDelegate(stub); if (delegate instanceof CorbaClientDelegate) { CorbaClientDelegate cdel = (CorbaClientDelegate) delegate; ContactInfoList cil = cdel.getContactInfoList(); if (cil instanceof CorbaContactInfoList) { CorbaContactInfoList ccil = (CorbaContactInfoList) cil; LocalClientRequestDispatcher lcrd = ccil.getLocalClientRequestDispatcher(); result = lcrd.useLocalInvocation(null); } } return result; }
public static Message readGIOPBody(ORB orb, CorbaConnection connection, Message msg) { ReadTimeouts readTimeouts = orb.getORBData().getTransportTCPReadTimeouts(); ByteBuffer buf = msg.getByteBuffer(); buf.position(MessageBase.GIOPMessageHeaderLength); int msgSizeMinusHeader = msg.getSize() - MessageBase.GIOPMessageHeaderLength; try { buf = connection .read(buf, GIOPMessageHeaderLength, msgSizeMinusHeader, readTimeouts.get_max_time_to_wait()); } catch (IOException e) { throw wrapper.ioexceptionWhenReadingConnection(e); } msg.setByteBuffer(buf); if (orb.giopDebugFlag) { dprint(".readGIOPBody: received message:"); ByteBuffer viewBuffer = buf.asReadOnlyBuffer(); viewBuffer.position(0).limit(msg.getSize()); ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer); CDRInputStream_1_0.printBuffer(bbwi); } return msg; }
public static CorbaClientDelegate makeClientDelegate(IOR ior) { ORB orb = ior.getORB(); CorbaContactInfoList ccil = orb.getCorbaContactInfoListFactory().create(ior); CorbaClientDelegate del = orb.getClientDelegateFactory().create(ccil); return del; }
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.wrapper = ORBUtilSystemException.get(orb, CORBALogDomains.RPC_ENCODING); this.omgWrapper = OMGSystemException.get(orb, CORBALogDomains.RPC_ENCODING); getBufferManager().setOutputObject(this); this.corbaMessageMediator = mediator; }
final public void initializeTemplate(ObjectKeyTemplate oktemp, boolean notifyORB, Policies policies, String codebase, String objectAdapterManagerId, ObjectAdapterId objectAdapterId) { adapterId = oktemp.getAdapterId(); iortemp = IORFactories.makeIORTemplate(oktemp); // This calls acceptors which create profiles and may // add tagged components to those profiles. orb.getCorbaTransportManager().addToIORTemplate(iortemp, policies, codebase, objectAdapterManagerId, objectAdapterId); adapterTemplate = IORFactories.makeObjectReferenceTemplate(orb, iortemp); currentFactory = adapterTemplate; if (notifyORB) { PIHandler pih = orb.getPIHandler(); if (pih != null) // This runs the IORInterceptors. pih.objectAdapterCreated(this); } iortemp.makeImmutable(); }
ior = ccil.getTargetIOR(); if (ior == null) throw wrapper.nullIor();
/** * Write the contents of the CDROutputStream to the specified output stream. Has the side-effect of pushing any * current Message onto the Message list. * * @param s * The output stream to write to. */ public void writeTo(CorbaConnection connection) throws java.io.IOException { // // Update the GIOP MessageHeader size field. // ByteBufferWithInfo bbwi = getByteBufferWithInfo(); getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize()); if (orb() != null) { if (((ORB) orb()).transportDebugFlag) { dprint(".writeTo: " + connection); } if (((ORB) orb()).giopDebugFlag) { CDROutputStream_1_0.printBuffer(bbwi); } } bbwi.byteBuffer.position(0).limit(bbwi.getSize()); connection.write(bbwi.byteBuffer); }
public static Message readGIOPBody(ORB orb, CorbaConnection connection, Message msg) { ReadTimeouts readTimeouts = orb.getORBData().getTransportTCPReadTimeouts(); ByteBuffer buf = msg.getByteBuffer(); buf.position(MessageBase.GIOPMessageHeaderLength); int msgSizeMinusHeader = msg.getSize() - MessageBase.GIOPMessageHeaderLength; try { buf = connection .read(buf, GIOPMessageHeaderLength, msgSizeMinusHeader, readTimeouts.get_max_time_to_wait()); } catch (IOException e) { throw wrapper.ioexceptionWhenReadingConnection(e); } msg.setByteBuffer(buf); if (orb.giopDebugFlag) { dprint(".readGIOPBody: received message:"); ByteBuffer viewBuffer = buf.asReadOnlyBuffer(); viewBuffer.position(0).limit(msg.getSize()); ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer); CDRInputStream_1_0.printBuffer(bbwi); } return msg; }
private CodeSetComponentInfo.CodeSetContext getCodeSets() { if (getConnection() == null) return CodeSetComponentInfo.LOCAL_CODE_SETS; else return getConnection().getCodeSetContext(); }
public final CodeBase getCodeBase() { if (getConnection() == null) return null; else return getConnection().getCodeBase(); }
public static CorbaClientDelegate makeClientDelegate(IOR ior) { ORB orb = ior.getORB(); CorbaContactInfoList ccil = orb.getCorbaContactInfoListFactory().create(ior); CorbaClientDelegate del = orb.getClientDelegateFactory().create(ccil); return del; }
private boolean isLocal() { boolean result = false; Delegate delegate = StubAdapter.getDelegate(stub); if (delegate instanceof CorbaClientDelegate) { CorbaClientDelegate cdel = (CorbaClientDelegate) delegate; ContactInfoList cil = cdel.getContactInfoList(); if (cil instanceof CorbaContactInfoList) { CorbaContactInfoList ccil = (CorbaContactInfoList) cil; LocalClientRequestDispatcher lcrd = ccil.getLocalClientRequestDispatcher(); result = lcrd.useLocalInvocation(null); } } return result; }
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.wrapper = ORBUtilSystemException.get(orb, CORBALogDomains.RPC_ENCODING); this.omgWrapper = OMGSystemException.get(orb, CORBALogDomains.RPC_ENCODING); getBufferManager().setOutputObject(this); this.corbaMessageMediator = mediator; }
final public void initializeTemplate(ObjectKeyTemplate oktemp, boolean notifyORB, Policies policies, String codebase, String objectAdapterManagerId, ObjectAdapterId objectAdapterId) { adapterId = oktemp.getAdapterId(); iortemp = IORFactories.makeIORTemplate(oktemp); // This calls acceptors which create profiles and may // add tagged components to those profiles. orb.getCorbaTransportManager().addToIORTemplate(iortemp, policies, codebase, objectAdapterManagerId, objectAdapterId); adapterTemplate = IORFactories.makeObjectReferenceTemplate(orb, iortemp); currentFactory = adapterTemplate; if (notifyORB) { PIHandler pih = orb.getPIHandler(); if (pih != null) // This runs the IORInterceptors. pih.objectAdapterCreated(this); } iortemp.makeImmutable(); }
ior = ccil.getTargetIOR(); if (ior == null) throw wrapper.nullIor();
/** * Write the contents of the CDROutputStream to the specified output stream. Has the side-effect of pushing any * current Message onto the Message list. * * @param s * The output stream to write to. */ public void writeTo(CorbaConnection connection) throws java.io.IOException { // // Update the GIOP MessageHeader size field. // ByteBufferWithInfo bbwi = getByteBufferWithInfo(); getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize()); if (orb() != null) { if (((ORB) orb()).transportDebugFlag) { dprint(".writeTo: " + connection); } if (((ORB) orb()).giopDebugFlag) { CDROutputStream_1_0.printBuffer(bbwi); } } bbwi.byteBuffer.position(0).limit(bbwi.getSize()); connection.write(bbwi.byteBuffer); }
private CodeSetComponentInfo.CodeSetContext getCodeSets() { if (getConnection() == null) return CodeSetComponentInfo.LOCAL_CODE_SETS; else return getConnection().getCodeSetContext(); }
private CodeSetComponentInfo.CodeSetContext getCodeSets() { if (getConnection() == null) return CodeSetComponentInfo.LOCAL_CODE_SETS; else return getConnection().getCodeSetContext(); }