コード例 #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)));
    }
}
コード例 #2
0
ファイル: PluginI.cpp プロジェクト: 2008hatake/zeroc-ice
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
ファイル: PluginI.cpp プロジェクト: HD-RENAULT-2015/ice-1
//
// 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)));
    }
}