Class FlowRestServiceImpl
- java.lang.Object
-
- org.opennms.netmgt.flows.rest.internal.FlowRestServiceImpl
-
- All Implemented Interfaces:
FlowRestService
public class FlowRestServiceImpl extends java.lang.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 java.util.List<java.lang.String>getApplications(java.lang.String matchingPrefix, long limit, javax.ws.rs.core.UriInfo uriInfo)Retrieve the list of applications.FlowSeriesResponsegetApplicationSeries(long step, java.lang.Integer N, java.util.Set<java.lang.String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)FlowSummaryResponsegetApplicationSummary(java.lang.Integer N, java.util.Set<java.lang.String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)java.util.List<java.lang.String>getConversations(java.lang.String locationPattern, java.lang.String protocolPattern, java.lang.String lowerIPPattern, java.lang.String upperIPPattern, java.lang.String applicationPattern, long limit, javax.ws.rs.core.UriInfo uriInfo)Retrieve the list of conversations.FlowSeriesResponsegetConversationSeries(long step, java.lang.Integer N, java.util.Set<java.lang.String> conversations, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)FlowSummaryResponsegetConversationSummary(java.lang.Integer N, java.util.Set<java.lang.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)java.util.List<java.lang.Integer>getDscpValues(javax.ws.rs.core.UriInfo uriInfo)protected static java.util.List<Filter>getFiltersFromQueryString(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams)java.lang.LonggetFlowCount(javax.ws.rs.core.UriInfo uriInfo)Retrieves the number of flows persisted in the repository.FlowNodeDetailsgetFlowExporter(java.lang.Integer nodeId)Retrieved detailed information about a specific node.java.util.List<FlowNodeSummary>getFlowExporters()Retrieves a summary of the nodes that have exported flows.java.lang.StringgetFlowGraphUrl()FlowGraphUrlInfogetFlowGraphUrlInfo(javax.ws.rs.core.UriInfo uriInfo)java.util.List<java.lang.String>getHosts(java.lang.String regex, long limit, javax.ws.rs.core.UriInfo uriInfo)Retrieve the list of hosts.FlowSeriesResponsegetHostSeries(long step, java.lang.Integer N, java.util.Set<java.lang.String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)FlowSummaryResponsegetHostSummary(java.lang.Integer N, java.util.Set<java.lang.String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)voidsetFlowGraphUrl(java.lang.String flowGraphUrl)
-
-
-
Constructor Detail
-
FlowRestServiceImpl
public FlowRestServiceImpl(FlowQueryService flowQueryService, NodeDao nodeDao, SnmpInterfaceDao snmpInterfaceDao, SessionUtils sessionUtils)
-
-
Method Detail
-
getFlowCount
public java.lang.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 java.util.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(java.lang.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 java.util.List<java.lang.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 java.util.List<java.lang.String> getApplications(java.lang.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(java.lang.Integer N, java.util.Set<java.lang.String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getApplicationSummaryin interfaceFlowRestService
-
getApplicationSeries
public FlowSeriesResponse getApplicationSeries(long step, java.lang.Integer N, java.util.Set<java.lang.String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getApplicationSeriesin interfaceFlowRestService
-
getHosts
public java.util.List<java.lang.String> getHosts(java.lang.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(java.lang.Integer N, java.util.Set<java.lang.String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getHostSummaryin interfaceFlowRestService
-
getHostSeries
public FlowSeriesResponse getHostSeries(long step, java.lang.Integer N, java.util.Set<java.lang.String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getHostSeriesin interfaceFlowRestService
-
getConversations
public java.util.List<java.lang.String> getConversations(java.lang.String locationPattern, java.lang.String protocolPattern, java.lang.String lowerIPPattern, java.lang.String upperIPPattern, java.lang.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(java.lang.Integer N, java.util.Set<java.lang.String> conversations, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getConversationSummaryin interfaceFlowRestService
-
getConversationSeries
public FlowSeriesResponse getConversationSeries(long step, java.lang.Integer N, java.util.Set<java.lang.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 java.lang.String getFlowGraphUrl()
-
setFlowGraphUrl
public void setFlowGraphUrl(java.lang.String flowGraphUrl)
-
getFiltersFromQueryString
protected static java.util.List<Filter> getFiltersFromQueryString(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams)
-
-