Connects to the data provider.

@param itemName
name of the item to play
340411
private final void connectToProvider(String itemName) {
        log.debug("Attempting connection to {}", itemName);
        IMessageInput in = msgInReference.get();
        if (in == null) {
            in = providerService.getLiveProviderInput(subscriberStream.getScope(), itemName, true);
            msgInReference.set(in);
        }
        if (in != null) {
            log.debug("Provider: {}", msgInReference.get());
            if (in.subscribe(this, null)) {
                log.debug("Subscribed to {} provider", itemName);
                // execute the processes to get Live playback setup
                try {
                    playLive();
                } catch (IOException e) {
                    log.warn("Could not play live stream: {}", itemName, e);
                }
            } else {
                log.warn("Subscribe to {} provider failed", itemName);
            }
        } else {
            log.warn("Provider was not found for {}", itemName);
            StreamService.sendNetStreamStatus(subscriberStream.getConnection(), StatusCodes.NS_PLAY_STREAMNOTFOUND, "Stream was not found", itemName, Status.ERROR, streamId);
        }
    }
462802
void add(T item) {
    int i = nextIndex.getAndIncrement() % data.length();
    data.set(i, item);
  }
1239892
public void setProductName(java.util.Collection<StringFilter> productName) {
        if (productName == null) {
            this.productName = null;
            return;
        }

        this.productName = new java.util.ArrayList<StringFilter>(productName);
    }
988747
public void setItem(java.util.Collection<ActivityResponse> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<ActivityResponse>(item);
    }
85054
@Override
	public final void bindView(View itemView, Context context, Cursor cursor) {
		doBindView(itemView, context, cursor);
	}
52802
private void connect(DeviceProxy device_proxy, String attributeName, String eventName, DeviceData deviceData) throws DevFailed {
        String deviceName = device_proxy.name();
        String adm_name = null;
        try {
            adm_name = device_proxy.adm_name();
        } catch (DevFailed e) {
            Except.throw_event_system_failed("API_BadConfigurationProperty",
                    "Can't subscribe to event for device " + deviceName
                            + "\n Check that device server is running...",
                    "NotifdEventConsumer.connect");
        }
        String channelName = adm_name;
        // If no connection exists to this channel, create it
        Database dbase = null;
        if (!channel_map.containsKey(channelName)) {
            if (device_proxy.use_db())
                dbase = device_proxy.get_db_obj();
            ConnectionStructure connectionStructure =
                    new ConnectionStructure(device_proxy.get_tango_host(), channelName,
                        deviceName, attributeName, eventName, dbase, deviceData, false);
            connect_event_channel(connectionStructure);
        } else if (device_proxy.use_db()) {
            dbase = device_proxy.get_db_obj();
        }
        EventChannelStruct eventChannelStruct = channel_map.get(channelName);
        eventChannelStruct.adm_device_proxy = device_proxy.get_adm_dev();
        eventChannelStruct.use_db = device_proxy.use_db();
        eventChannelStruct.dbase = dbase;

        device_channel_map.put(deviceName, channelName);
    }
122009
public CommerceExtendedData addItem(Item item) throws JSONException {
		if (this.items == null) {
			this.items = new ArrayList<>();
		}
		items.add(item);
		return this;
	}
1086856
private void setupHost(ListItemHostWidget host, Widget view, final int dataIndex) {
        boolean selected = setupView(view, dataIndex);
        host.setGuest(view, dataIndex);
        host.setSelected(selected);
        host.requestLayout();

        if (mContent.getChildren().contains(host)) {
            Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "setupItem(%s): added item(%s) at dataIndex [%d]",
                    getName(), view.getName(), dataIndex);
        } else {
            Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "setupItem(%s): reuse item(%s) at dataIndex [%d]",
                    getName(), view.getName(), dataIndex);
        }
    }
665962
public void deleteItem(String itemId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        Collection<String> items = new ArrayList<>(1);
        items.add(itemId);
        deleteItem(items);
    }
919492
public function lookup($itemName)
        {
            if (!$this->has($itemName)) {
                throw new Exception(
                    'Cannot lookup dependency "' . $itemName . '" since it is not registered.'
                );
            }

            switch ($this->_store[$itemName]['lookupType']) {
                case self::TYPE_ALIAS:
                    return $this->_createAlias($itemName);
                case self::TYPE_VALUE:
                    return $this->_getValue($itemName);
                case self::TYPE_INSTANCE:
                    return $this->_createNewInstance($itemName);
                case self::TYPE_SHARED:
                    return $this->_createSharedInstance($itemName);
            }
        }
380930
protected void handleOpenItemRequest(final WTree tree, final XmlStringBuilder xml, final String itemId) {
		TreeItemModel model = tree.getTreeModel();
		Set<String> selectedRows = new HashSet(tree.getSelectedRows());
		WTree.ExpandMode mode = tree.getExpandMode();

		// Only want to render the children of the "open item" so only include the open item id in the expanded rows
		Set<String> expandedRows = new HashSet();
		expandedRows.add(itemId);

		if (tree.getCustomTree() == null) {
			List<Integer> rowIndex = tree.getExpandedItemIdIndexMap().get(itemId);
			paintItem(tree, mode, model, rowIndex, xml, selectedRows, expandedRows);
		} else {
			TreeItemIdNode node = tree.getCustomIdNodeMap().get(itemId);
			paintCustomItem(tree, mode, model, node, xml, selectedRows, expandedRows);
		}
	}
75070
public static void assertNodeExistById(final Session session, final String itemId) throws RepositoryException {
        try {
            session.getNodeByIdentifier(itemId);
        } catch (final ItemNotFoundException e) {
            LOG.debug("Item with id {} does not exist", itemId, e);
            fail(e.getMessage());
        }
    }
283375
public void setItems(java.util.Collection<java.util.Map<String,AttributeValue>> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        java.util.List<java.util.Map<String,AttributeValue>> itemsCopy = new java.util.ArrayList<java.util.Map<String,AttributeValue>>(items.size());
        itemsCopy.addAll(items);
        this.items = itemsCopy;
    }
1287113
public void addItem (int index, T item)
    {
        if (_items == null) {
            return;
        }
        _items.add(index, item);
    }
106960
protected void addItemView(View itemView, int childIndex) {
        final ViewGroup currentParent = (ViewGroup) itemView.getParent();
        if (currentParent != null) {
            currentParent.removeView(itemView);
        }
        ((ViewGroup) mMenuView).addView(itemView, childIndex);
    }
1200305
public Date getDate(String itemName) {
        try {
            return DateUtil.parseDate(getItem(itemName));
        } catch (Exception e) {
            return null;
        }
    }
825734
protected void addItem(ItemState item)
   {
      index.put(item.getData().getIdentifier(), item);
      index.put(item.getData().getQPath(), item);
      index.put(new ParentIDQPathBasedKey(item), item);
      index.put(new IDStateBasedKey(item.getData().getIdentifier(), item.getState()), item);

      if (item.getData().isNode())
      {
         Map<String, ItemState> children = lastChildNodeStates.get(item.getData().getParentIdentifier());
         if (children == null)
         {
            children = new HashMap<String, ItemState>();
            lastChildNodeStates.put(item.getData().getParentIdentifier(), children);
         }
         children.put(item.getData().getIdentifier(), item);

         List<ItemState> listItemState = childNodeStates.get(item.getData().getParentIdentifier());
         if (listItemState == null)
         {
            listItemState = new ArrayList<ItemState>();
            childNodeStates.put(item.getData().getParentIdentifier(), listItemState);
         }
         listItemState.add(item);
         if (item.isPathChanged())
         {
            if (allPathsChanged == null)
            {
               allPathsChanged = new ArrayList<ItemState>();
            }
            allPathsChanged.add(item);
         }
      }
      else
      {
         Map<String, ItemState> children = lastChildPropertyStates.get(item.getData().getParentIdentifier());
         if (children == null)
         {
            children = new HashMap<String, ItemState>();
            lastChildPropertyStates.put(item.getData().getParentIdentifier(), children);
         }
         children.put(item.getData().getIdentifier(), item);

         List<ItemState> listItemState = childPropertyStates.get(item.getData().getParentIdentifier());
         if (listItemState == null)
         {
            listItemState = new ArrayList<ItemState>();
            childPropertyStates.put(item.getData().getParentIdentifier(), listItemState);
         }
         listItemState.add(item);
      }

      if (item.isNode() && item.isPersisted())
      {
         int[] childInfo = childNodesInfo.get(item.getData().getParentIdentifier());
         if (childInfo == null)
         {
            childInfo = new int[2];
         }

         if (item.isDeleted())
         {
            --childInfo[CHILD_NODES_COUNT];
         }
         else if (item.isAdded())
         {
            ++childInfo[CHILD_NODES_COUNT];
            childInfo[CHILD_NODES_LAST_ORDER_NUMBER] = ((NodeData)item.getData()).getOrderNumber();

         }
         childNodesInfo.put(item.getData().getParentIdentifier(), childInfo);
      }
   }