container/resource/src/main/java/org/mobicents/slee/resource/ServiceLookupFacilityImpl.java
private ReceivableService createReceivableService(
			ServiceComponent serviceComponent) {
		ComponentRepository componentRepository = container
				.getComponentRepository();
		HashSet<ReceivableEvent> resultSet = new HashSet<ReceivableEvent>();
		for (SbbID sbbID : serviceComponent.getSbbIDs(componentRepository)) {
			SbbComponent sbbComponent = componentRepository
					.getComponentByID(sbbID);
			for (EventEntryDescriptor eventEntry : sbbComponent.getDescriptor()
					.getEventEntries().values()) {
				EventTypeID eventTypeID = eventEntry.getEventReference();
				final Set<EventTypeID> allowedEventTypes = raEntity.getAllowedEventTypes();
				if (allowedEventTypes == null
						|| allowedEventTypes.contains(eventTypeID)) {
					/*
					 * The Service Lookup Facility will only return Service
					 * event type information forthe event types referenced by
					 * the resource adaptor types implemented by the Resource
					 * Adaptor.
					 */
					ReceivableEventImpl receivableEventImpl = new ReceivableEventImpl(
							eventTypeID, eventEntry.getResourceOption(),
							eventEntry.isInitialEvent());
					// add it if it's not in the set or if it is but initial
					// event is set (this way if there is a conflict the one
					// with initial as true wins)
					if (!resultSet.contains(receivableEventImpl)
							|| receivableEventImpl.isInitialEvent()) {
						resultSet.add(receivableEventImpl);
					}
				}
			}
		}
		return new ReceivableServiceImpl(serviceComponent.getServiceID(),
				resultSet.toArray(new ReceivableEventImpl[resultSet.size()]));
	}
private ReceivableService createReceivableService(
			ServiceComponent serviceComponent) {
		ComponentRepository componentRepository = container
				.getComponentRepository();
		HashSet<ReceivableEvent> resultSet = new HashSet<ReceivableEvent>();
		for (SbbID sbbID : serviceComponent.getSbbIDs(componentRepository)) {
			SbbComponent sbbComponent = componentRepository
					.getComponentByID(sbbID);
			for (EventEntryDescriptor eventEntry : sbbComponent.getDescriptor()
					.getEventEntries().values()) {
				EventTypeID eventTypeID = eventEntry.getEventReference();
				final Set<EventTypeID> allowedEventTypes = raEntity.getAllowedEventTypes();
				if (allowedEventTypes == null
						|| allowedEventTypes.contains(eventTypeID)) {
					/*
					 * The Service Lookup Facility will only return Service
					 * event type information forthe event types referenced by
					 * the resource adaptor types implemented by the Resource
					 * Adaptor.
					 */
					ReceivableEventImpl receivableEventImpl = new ReceivableEventImpl(
							eventTypeID, eventEntry.getResourceOption(),
							eventEntry.isInitialEvent());
					// add it if it's not in the set or if it is but initial
					// event is set (this way if there is a conflict the one
					// with initial as true wins)
					if (!resultSet.contains(receivableEventImpl)
							|| receivableEventImpl.isInitialEvent()) {
						resultSet.add(receivableEventImpl);
					}
				}
			}
		}
		return new ReceivableServiceImpl(serviceComponent.getServiceID(),
				resultSet.toArray(new ReceivableEventImpl[resultSet.size()]));
	}
Creates a {@link ReceivableServiceImpl} instance from the specified
service component

@param serviceComponent
@return