Пример #1
0
//
// Plugin implementation.
//
IceSSL::PluginI::PluginI(const Ice::CommunicatorPtr& communicator)
{
    _sharedInstance = new SharedInstance(communicator);

    IceInternal::ProtocolPluginFacadePtr facade = IceInternal::getProtocolPluginFacade(communicator);
    
    //
    // Register the endpoint factory. We have to do this now, rather than
    // in initialize, because the communicator may need to interpret
    // proxies before the plug-in is fully initialized.
    //
    facade->addEndpointFactory(new EndpointFactoryI(new Instance(_sharedInstance, EndpointType, "ssl")));
}
Пример #2
0
void
TestPluginI::initialize()
{
    IceInternal::ProtocolPluginFacadePtr facade = IceInternal::getProtocolPluginFacade(_communicator);

    for(Ice::Short s = 0; s < 100; ++s)
    {
        IceInternal::EndpointFactoryPtr factory = facade->getEndpointFactory(s);
        if(factory)
        {
            facade->addEndpointFactory(new EndpointFactory(factory));
        }
    }
}
Пример #3
0
//
// Plugin implementation.
//
IceWS::PluginI::PluginI(const Ice::CommunicatorPtr& communicator)
{
    IceInternal::ProtocolPluginFacadePtr facade = getProtocolPluginFacade(communicator);
    IceInternal::EndpointFactoryPtr tcpFactory = facade->getEndpointFactory(TCPEndpointType);
    if(tcpFactory)
    {
        InstancePtr tcpInstance = new Instance(communicator, WSEndpointType, "ws");
        facade->addEndpointFactory(new EndpointFactoryI(tcpInstance, tcpFactory->clone(tcpInstance)));
    }
    IceInternal::EndpointFactoryPtr sslFactory = facade->getEndpointFactory(2); // 2 = SSLEndpointType
    if(sslFactory)
    {
        InstancePtr sslInstance = new Instance(communicator, WSSEndpointType, "wss");
        facade->addEndpointFactory(new EndpointFactoryI(sslInstance, sslFactory->clone(sslInstance)));
    }
}
Пример #4
0
//
// Plugin implementation.
//
IceBT::PluginI::PluginI(const Ice::CommunicatorPtr& com) :
    _engine(new Engine(com))
{
    IceInternal::ProtocolPluginFacadePtr f = IceInternal::getProtocolPluginFacade(com);

    //
    // Register the endpoint factory. We have to do this now, rather
    // than in initialize, because the communicator may need to
    // interpret proxies before the plug-in is fully initialized.
    //
    InstancePtr bt = new Instance(_engine, BTEndpointType, "bt");
    f->addEndpointFactory(new EndpointFactoryI(bt));

    InstancePtr bts = new Instance(_engine, BTSEndpointType, "bts");
    f->addEndpointFactory(new IceInternal::UnderlyingEndpointFactory(bts, SSLEndpointType, BTEndpointType));
}
Пример #5
0
//
// Plugin implementation.
//
IceBT::PluginI::PluginI(const Ice::CommunicatorPtr& com) :
    _engine(new Engine(com))
{
    IceInternal::ProtocolPluginFacadePtr pluginFacade = IceInternal::getProtocolPluginFacade(com);

    //
    // Register the endpoint factory. We have to do this now, rather
    // than in initialize, because the communicator may need to
    // interpret proxies before the plug-in is fully initialized.
    //
    pluginFacade->addEndpointFactory(new EndpointFactoryI(new Instance(_engine, BTEndpointType, "bt")));

    IceInternal::EndpointFactoryPtr sslFactory = pluginFacade->getEndpointFactory(SSLEndpointType);
    if(sslFactory)
    {
        InstancePtr instance = new Instance(_engine, BTSEndpointType, "bts");
        pluginFacade->addEndpointFactory(sslFactory->clone(instance, new EndpointFactoryI(instance)));
    }
}
Пример #6
0
//
// Plugin implementation.
//
IceSSL::PluginI::PluginI(const Ice::CommunicatorPtr& communicator)
{
#if defined(ICE_USE_SECURE_TRANSPORT)
    _engine = new SecureTransportEngine(communicator);
#elif defined(ICE_USE_SCHANNEL)
    _engine = new SChannelEngine(communicator);
#else
    _engine = new OpenSSLEngine(communicator);
#endif
    
    IceInternal::ProtocolPluginFacadePtr facade = IceInternal::getProtocolPluginFacade(communicator);
    
    //
    // Register the endpoint factory. We have to do this now, rather
    // than in initialize, because the communicator may need to
    // interpret proxies before the plug-in is fully initialized.
    //
    IceInternal::EndpointFactoryPtr sslFactory = new EndpointFactoryI(new Instance(_engine, EndpointType, "ssl"));
    facade->addEndpointFactory(sslFactory);
    
    IceInternal::ProtocolInstancePtr wss = new IceInternal::ProtocolInstance(communicator, WSSEndpointType, "wss");
    facade->addEndpointFactory(new IceInternal::WSEndpointFactory(wss, sslFactory->clone(wss)));
}