{
if (flowConstruct != null)
{
if (flowConstruct instanceof Service)
{
MessageSource source = ((Service) flowConstruct).getMessageSource();
if (source instanceof InboundEndpoint)
{
return ((InboundEndpoint) source).getEndpointURI().toString();
}
else if (source instanceof ServiceCompositeMessageSource)
{
List<InboundEndpoint> endpoints = ((ServiceCompositeMessageSource) muleService.getMessageSource()).getEndpoints();
if (endpoints.size() > 0)
{
return endpoints.get(0).getEndpointURI().toString();
}
}
}
else if (flowConstruct instanceof Pipeline)
{
MessageSource source = ((Pipeline) flowConstruct).getMessageSource();
if (source instanceof InboundEndpoint)
{
return ((InboundEndpoint) source).getEndpointURI().toString();
}