Ejemplo n.º 1
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)));
    }
}
Ejemplo n.º 2
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)));
    }
}
Ejemplo n.º 3
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)));
}