/**
	 * Checks if the packet was sent by an entity inside the XMPP domain of the
	 * component.
	 * <p/>
	 * An entity is considered a local entity if the domain of its JID either
	 * equals the XMPP domain, or is a subdomain of the XMPP domain.
	 * 
	 * @param packet
	 *            The packet for which to send the sender.
	 * @return <tt>true</tt> if the stanza was sent by something inside the
	 *         local XMPP domain, <tt>false</tt> otherwise.
	 */
		private bool sentByLocalEntity(Packet packet)
		{
			JID from = packet.getFrom();
			if (from == null) {
				return true;
			}
			string domain = from.getDomain();
			return (domain.equals(getDomain()) || domain
			    .endsWith("." + getDomain()));
		}