Beispiel #1
0
        /// <summary>
        /// Derives another RemoteConnectorInfoManagerImpl with
        /// a different RemoteFrameworkConnectionInfo but with the
        /// same metadata
        /// </summary>
        /// <param name="info"></param>
        public RemoteConnectorInfoManagerImpl Derive(RemoteFrameworkConnectionInfo info)
        {
            RemoteConnectorInfoManagerImpl rv = new RemoteConnectorInfoManagerImpl();
            IList <Object> remoteInfosObj     =
                (IList <Object>)SerializerUtil.CloneObject(_connectorInfo);
            IList <ConnectorInfo> remoteInfos =
                CollectionUtil.NewList <object, ConnectorInfo>(remoteInfosObj);

            foreach (ConnectorInfo remoteInfo in remoteInfos)
            {
                ((RemoteConnectorInfoImpl)remoteInfo).RemoteConnectionInfo = (info);
            }
            rv._connectorInfo =
                CollectionUtil.AsReadOnlyList(remoteInfos);
            return(rv);
        }
 public override ConnectorInfoManager GetRemoteManager(RemoteFrameworkConnectionInfo info)
 {
     RemoteManagerKey key = new RemoteManagerKey(info);
     lock (REMOTE_LOCK)
     {
         RemoteConnectorInfoManagerImpl rv = CollectionUtil.GetValue(_remoteManagerCache, key, null);
         if (rv == null)
         {
             rv = new RemoteConnectorInfoManagerImpl(info);
         }
         _remoteManagerCache[key] = rv;
         return rv.Derive(info);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Derives another RemoteConnectorInfoManagerImpl with
 /// a different RemoteFrameworkConnectionInfo but with the
 /// same metadata
 /// </summary>
 /// <param name="info"></param>
 public RemoteConnectorInfoManagerImpl Derive(RemoteFrameworkConnectionInfo info)
 {
     RemoteConnectorInfoManagerImpl rv = new RemoteConnectorInfoManagerImpl();
     IList<Object> remoteInfosObj =
         (IList<Object>)SerializerUtil.CloneObject(_connectorInfo);
     IList<ConnectorInfo> remoteInfos =
         CollectionUtil.NewList<object, ConnectorInfo>(remoteInfosObj);
     foreach (ConnectorInfo remoteInfo in remoteInfos)
     {
         ((RemoteConnectorInfoImpl)remoteInfo).RemoteConnectionInfo = (info);
     }
     rv._connectorInfo =
         CollectionUtil.AsReadOnlyList(remoteInfos);
     return rv;
 }