Class FlowRestServiceImpl
- java.lang.Object
-
- org.opennms.netmgt.flows.rest.internal.FlowRestServiceImpl
-
- All Implemented Interfaces:
FlowRestService
public class FlowRestServiceImpl extends Object implements FlowRestService
-
-
Field Summary
-
Fields inherited from interface org.opennms.netmgt.flows.rest.FlowRestService
DEFAULT_LIMIT, DEFAULT_STEP_MS, DEFAULT_TOP_N
-
-
Constructor Summary
Constructors Constructor Description FlowRestServiceImpl(FlowQueryService flowQueryService, NodeDao nodeDao, SnmpInterfaceDao snmpInterfaceDao, SessionUtils sessionUtils)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getApplications(String matchingPrefix, long limit, javax.ws.rs.core.UriInfo uriInfo)Retrieve the list of applications.FlowSeriesResponsegetApplicationSeries(long step, Integer N, Set<String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)FlowSummaryResponsegetApplicationSummary(Integer N, Set<String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)List<String>getConversations(String locationPattern, String protocolPattern, String lowerIPPattern, String upperIPPattern, String applicationPattern, long limit, javax.ws.rs.core.UriInfo uriInfo)Retrieve the list of conversations.FlowSeriesResponsegetConversationSeries(long step, Integer N, Set<String> conversations, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)FlowSummaryResponsegetConversationSummary(Integer N, Set<String> conversations, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)FlowSeriesResponsegetDscpSeries(long step, javax.ws.rs.core.UriInfo uriInfo)FlowSummaryResponsegetDscpSummaries(javax.ws.rs.core.UriInfo uriInfo)List<Integer>getDscpValues(javax.ws.rs.core.UriInfo uriInfo)protected static List<Filter>getFiltersFromQueryString(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)LonggetFlowCount(javax.ws.rs.core.UriInfo uriInfo)Retrieves the number of flows persisted in the repository.FlowNodeDetailsgetFlowExporter(Integer nodeId)Retrieved detailed information about a specific node.List<FlowNodeSummary>getFlowExporters()Retrieves a summary of the nodes that have exported flows.StringgetFlowGraphUrl()FlowGraphUrlInfogetFlowGraphUrlInfo(javax.ws.rs.core.UriInfo uriInfo)List<String>getHosts(String regex, long limit, javax.ws.rs.core.UriInfo uriInfo)Retrieve the list of hosts.FlowSeriesResponsegetHostSeries(long step, Integer N, Set<String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)FlowSummaryResponsegetHostSummary(Integer N, Set<String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)voidsetFlowGraphUrl(String flowGraphUrl)
-
-
-
Constructor Detail
-
FlowRestServiceImpl
public FlowRestServiceImpl(FlowQueryService flowQueryService, NodeDao nodeDao, SnmpInterfaceDao snmpInterfaceDao, SessionUtils sessionUtils)
-
-
Method Detail
-
getFlowCount
public Long getFlowCount(javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:FlowRestServiceRetrieves the number of flows persisted in the repository. Supports filtering.- Specified by:
getFlowCountin interfaceFlowRestService- Parameters:
uriInfo- JAX-RS context- Returns:
- number of flows that match the given query
-
getFlowExporters
public List<FlowNodeSummary> getFlowExporters()
Description copied from interface:FlowRestServiceRetrieves a summary of the nodes that have exported flows. Supports filtering.- Specified by:
getFlowExportersin interfaceFlowRestService- Returns:
- node summaries
-
getFlowExporter
public FlowNodeDetails getFlowExporter(Integer nodeId)
Description copied from interface:FlowRestServiceRetrieved detailed information about a specific node. Supports filtering.- Specified by:
getFlowExporterin interfaceFlowRestService- Parameters:
nodeId- node id- Returns:
- node details
-
getDscpValues
public List<Integer> getDscpValues(javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getDscpValuesin interfaceFlowRestService
-
getDscpSummaries
public FlowSummaryResponse getDscpSummaries(javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getDscpSummariesin interfaceFlowRestService
-
getDscpSeries
public FlowSeriesResponse getDscpSeries(long step, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getDscpSeriesin interfaceFlowRestService
-
getApplications
public List<String> getApplications(String matchingPrefix, long limit, javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:FlowRestServiceRetrieve the list of applications. Supports filtering.- Specified by:
getApplicationsin interfaceFlowRestService- Parameters:
matchingPrefix- a string prefix that can be used to further filter the resultslimit- the maximum number of applications to return- Returns:
- the list of applications
-
getApplicationSummary
public FlowSummaryResponse getApplicationSummary(Integer N, Set<String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getApplicationSummaryin interfaceFlowRestService
-
getApplicationSeries
public FlowSeriesResponse getApplicationSeries(long step, Integer N, Set<String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getApplicationSeriesin interfaceFlowRestService
-
getHosts
public List<String> getHosts(String regex, long limit, javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:FlowRestServiceRetrieve the list of hosts. Supports filtering.- Specified by:
getHostsin interfaceFlowRestServicelimit- the maximum number of hosts to return- Returns:
- the list of hosts
-
getHostSummary
public FlowSummaryResponse getHostSummary(Integer N, Set<String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getHostSummaryin interfaceFlowRestService
-
getHostSeries
public FlowSeriesResponse getHostSeries(long step, Integer N, Set<String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getHostSeriesin interfaceFlowRestService
-
getConversations
public List<String> getConversations(String locationPattern, String protocolPattern, String lowerIPPattern, String upperIPPattern, String applicationPattern, long limit, javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:FlowRestServiceRetrieve the list of conversations. Supports filtering.- Specified by:
getConversationsin interfaceFlowRestService- Parameters:
locationPattern- the regex pattern for the location fieldprotocolPattern- the regex pattern for the protocol fieldlowerIPPattern- the regex pattern for the lower IP fieldupperIPPattern- the regex pattern for the upper IP fieldapplicationPattern- the regex pattern for the application fieldlimit- limit for how many conversations to return- Returns:
- the list of conversations
-
getConversationSummary
public FlowSummaryResponse getConversationSummary(Integer N, Set<String> conversations, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getConversationSummaryin interfaceFlowRestService
-
getConversationSeries
public FlowSeriesResponse getConversationSeries(long step, Integer N, Set<String> conversations, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getConversationSeriesin interfaceFlowRestService
-
getFlowGraphUrlInfo
public FlowGraphUrlInfo getFlowGraphUrlInfo(javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getFlowGraphUrlInfoin interfaceFlowRestService
-
getFlowGraphUrl
public String getFlowGraphUrl()
-
setFlowGraphUrl
public void setFlowGraphUrl(String flowGraphUrl)
-
-