/// <summary> /// Create an instance of IiopUrlUtil, which adds the given tagged components to /// created iors. /// </summary> public static IiopUrlUtil Create(Codec codec, object[] additionalComponents) { IiopUrlUtil result = new IiopUrlUtil(codec); result.SetDefaultComponents(additionalComponents); return(result); }
private void Initalize() { m_serializerFactory = new Ch.Elca.Iiop.Marshalling.SerializerFactory(); m_codecFactory = new CodecFactoryImpl(m_serializerFactory); m_argSerializerFactory = new Ch.Elca.Iiop.Marshalling.ArgumentsSerializerFactory(m_serializerFactory); Codec iiopUrlUtilCodec = m_codecFactory.create_codec( new Encoding(ENCODING_CDR_ENCAPS.ConstVal, 1, 2)); m_iiopUrlUtil = IiopUrlUtil.Create(iiopUrlUtilCodec, new object[] { Ch.Elca.Iiop.Services.CodeSetService.CreateDefaultCodesetComponent(iiopUrlUtilCodec)}); m_serializerFactory.Initalize(m_serializerFactoryConfig, m_iiopUrlUtil); }
public void SetUp() { m_serFactory = new SerializerFactory(); omg.org.IOP.CodecFactory codecFactory = new Ch.Elca.Iiop.Interception.CodecFactoryImpl(m_serFactory); m_codec = codecFactory.create_codec( new omg.org.IOP.Encoding(omg.org.IOP.ENCODING_CDR_ENCAPS.ConstVal, 1, 2)); m_iiopUrlUtil = IiopUrlUtil.Create(m_codec, new object[] { Services.CodeSetService.CreateDefaultCodesetComponent(m_codec)}); m_serFactory.Initalize(new SerializerFactoryConfig(), m_iiopUrlUtil); m_handler = new GiopMessageHandler( new ArgumentsSerializerFactory(m_serFactory), GiopHeader.GetDefaultHeaderFlagsForEndian(Endian.BigEndian)); }
/// <summary> /// Initalizes the factory. Before initialize is called, /// the factory in non-usable. /// </summary> internal void Initalize(SerializerFactoryConfig config, IiopUrlUtil iiopUrlUtil) { m_config = config; m_iiopUrlUtil = iiopUrlUtil; // the following depend on the config m_wideStringSer = new StringSerializer(true, config.StringSerializationAllowNull); m_nonWideStringSer = new StringSerializer(false, config.StringSerializationAllowNull); }
internal void Configure(GiopClientConnectionManager conManager, GiopMessageHandler messageHandler, IiopUrlUtil iiopUrlUtil, RetryConfig retries) { m_conManager = conManager; m_messageHandler = messageHandler; m_iiopUrlUtil = iiopUrlUtil; m_retries = retries; }
public void SetUp() { m_serFactory = new SerializerFactory(); CodecFactory codecFactory = new CodecFactoryImpl(m_serFactory); Codec codec = codecFactory.create_codec( new Encoding(ENCODING_CDR_ENCAPS.ConstVal, 1, 2)); m_iiopUrlUtil = IiopUrlUtil.Create(codec, new object[] { Services.CodeSetService.CreateDefaultCodesetComponent(codec)}); m_serFactory.Initalize(new SerializerFactoryConfig(), m_iiopUrlUtil); }
private readonly Hashtable m_typesVerified = new Hashtable(); // contains the verified types for this proxy #endregion IFields #region IConstructors /// <param name="nextSink">the next sink in the channel. In this sink chain, a /// IiopClientTransportSink must be present.</param> internal IiopClientFormatterSink(IClientChannelSink nextSink, GiopClientConnectionManager conManager, GiopMessageHandler messageHandler, IiopUrlUtil iiopUrlUtil, RetryConfig retries) { m_nextSink = nextSink; m_conManager = conManager; m_messageHandler = messageHandler; m_iiopUrlUtil = iiopUrlUtil; m_retries = retries; }
/// <summary> /// Create an instance of IiopUrlUtil, which adds the given tagged components to /// created iors. /// </summary> public static IiopUrlUtil Create(Codec codec, object[] additionalComponents) { IiopUrlUtil result = new IiopUrlUtil(codec); result.SetDefaultComponents(additionalComponents); return result; }
/// <summary>initalize this channel</summary> private void InitChannel() { Ch.Elca.Iiop.Marshalling.ArgumentsSerializerFactory argumentSerializerFactory = omg.org.CORBA.OrbServices.GetSingleton().ArgumentsSerializerFactory; CodecFactory codecFactory = omg.org.CORBA.OrbServices.GetSingleton().CodecFactory; omg.org.IOP.Codec codec = codecFactory.create_codec( new omg.org.IOP.Encoding(omg.org.IOP.ENCODING_CDR_ENCAPS.ConstVal, 1, 2)); m_transportFactory.Codec = codec; m_iiopUrlUtil = omg.org.CORBA.OrbServices.GetSingleton().IiopUrlUtil; if (!m_isBidir) { m_conManager = new GiopClientConnectionManager(m_transportFactory, m_requestTimeOut, m_unusedClientConnectionTimeOut, m_maxNumberOfConnections, m_allowMultiplex, m_maxNumberOfMultplexedRequests, m_headerFlags); } else { m_conManager = new GiopBidirectionalConnectionManager(m_transportFactory, m_requestTimeOut, m_unusedClientConnectionTimeOut, m_maxNumberOfConnections, m_allowMultiplex, m_maxNumberOfMultplexedRequests, m_headerFlags); } IiopClientTransportSinkProvider transportProvider = new IiopClientTransportSinkProvider(m_conManager); if (m_providerChain != null) { // append transport provider to the chain IClientChannelSinkProvider prov = m_providerChain; while (prov.Next != null) { prov = prov.Next; } prov.Next = transportProvider; // append the transport provider at the end } else { // create the default provider chain IClientFormatterSinkProvider formatterProv = new IiopClientFormatterSinkProvider(); formatterProv.Next = transportProvider; m_providerChain = formatterProv; } GiopMessageHandler messageHandler = new GiopMessageHandler(argumentSerializerFactory, m_headerFlags, m_interceptionOptions); ConfigureSinkProviderChain(m_conManager, messageHandler, m_iiopUrlUtil, m_retryConfig); }
/// <summary> /// Configures the installed IIOPClientSideFormatterProivder /// </summary> /// <param name="interceptionOptions"></param> private void ConfigureSinkProviderChain(GiopClientConnectionManager conManager, GiopMessageHandler messageHandler, IiopUrlUtil iiopUrlUtil, RetryConfig retries) { IClientChannelSinkProvider prov = m_providerChain; while (prov != null) { if (prov is IiopClientFormatterSinkProvider) { ((IiopClientFormatterSinkProvider)prov).Configure(conManager, messageHandler, iiopUrlUtil, retries); break; } prov = prov.Next; } }
/// <summary>initalize the channel</summary> private void InitChannel() { if (m_port < 0) { throw new ArgumentException("illegal port to listen on: " + m_port); } Ch.Elca.Iiop.Marshalling.ArgumentsSerializerFactory argumentSerializerFactory = omg.org.CORBA.OrbServices.GetSingleton().ArgumentsSerializerFactory; CodecFactory codecFactory = omg.org.CORBA.OrbServices.GetSingleton().CodecFactory; m_codec = codecFactory.create_codec( new omg.org.IOP.Encoding(omg.org.IOP.ENCODING_CDR_ENCAPS.ConstVal, 1, 2)); m_transportFactory.Codec = m_codec; m_iiopUrlUtil = omg.org.CORBA.OrbServices.GetSingleton().IiopUrlUtil; m_hostNameToUse = DetermineMachineNameToUse(); SetupChannelData(m_hostNameToUse, m_port, m_codec, null); m_connectionListener = m_transportFactory.CreateConnectionListener(new ClientAccepted(this.ProcessClientMessages)); // create the default provider chain, if no chain specified if (m_providerChain == null) { m_providerChain = new IiopServerFormatterSinkProvider(); } GiopMessageHandler messageHandler = new GiopMessageHandler(argumentSerializerFactory, m_headerFlags, m_interceptionOptions); ConfigureSinkProviderChain(messageHandler); IServerChannelSink sinkChain = ChannelServices.CreateServerChannelSinkChain(m_providerChain, this); m_transportSink = new IiopServerTransportSink(sinkChain); if (m_bidirConnectionManager != null) { // bidirectional entry point into server channel sink chain. m_bidirConnectionManager.RegisterMessageReceptionHandler(m_transportSink, m_serverThreadsMaxPerConnection); } // ready to wait for messages StartListening(null); // publish init-service Services.CORBAInitServiceImpl.Publish(); // public the handler for generic corba operations StandardCorbaOps.SetUpHandler(); }