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.FlowSeriesResponse
getApplicationSeries(long step, java.lang.Integer N, java.util.Set<java.lang.String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
FlowSummaryResponse
getApplicationSummary(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.FlowSeriesResponse
getConversationSeries(long step, java.lang.Integer N, java.util.Set<java.lang.String> conversations, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
FlowSummaryResponse
getConversationSummary(java.lang.Integer N, java.util.Set<java.lang.String> conversations, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
FlowSeriesResponse
getDscpSeries(long step, javax.ws.rs.core.UriInfo uriInfo)
FlowSummaryResponse
getDscpSummaries(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.Long
getFlowCount(javax.ws.rs.core.UriInfo uriInfo)
Retrieves the number of flows persisted in the repository.FlowNodeDetails
getFlowExporter(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.String
getFlowGraphUrl()
FlowGraphUrlInfo
getFlowGraphUrlInfo(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.FlowSeriesResponse
getHostSeries(long step, java.lang.Integer N, java.util.Set<java.lang.String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
FlowSummaryResponse
getHostSummary(java.lang.Integer N, java.util.Set<java.lang.String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
void
setFlowGraphUrl(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:FlowRestService
Retrieves the number of flows persisted in the repository. Supports filtering.- Specified by:
getFlowCount
in 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:FlowRestService
Retrieves a summary of the nodes that have exported flows. Supports filtering.- Specified by:
getFlowExporters
in interfaceFlowRestService
- Returns:
- node summaries
-
getFlowExporter
public FlowNodeDetails getFlowExporter(java.lang.Integer nodeId)
Description copied from interface:FlowRestService
Retrieved detailed information about a specific node. Supports filtering.- Specified by:
getFlowExporter
in 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:
getDscpValues
in interfaceFlowRestService
-
getDscpSummaries
public FlowSummaryResponse getDscpSummaries(javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getDscpSummaries
in interfaceFlowRestService
-
getDscpSeries
public FlowSeriesResponse getDscpSeries(long step, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getDscpSeries
in 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:FlowRestService
Retrieve the list of applications. Supports filtering.- Specified by:
getApplications
in 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:
getApplicationSummary
in 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:
getApplicationSeries
in 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:FlowRestService
Retrieve the list of hosts. Supports filtering.- Specified by:
getHosts
in interfaceFlowRestService
limit
- 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:
getHostSummary
in 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:
getHostSeries
in 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:FlowRestService
Retrieve the list of conversations. Supports filtering.- Specified by:
getConversations
in 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:
getConversationSummary
in 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:
getConversationSeries
in interfaceFlowRestService
-
getFlowGraphUrlInfo
public FlowGraphUrlInfo getFlowGraphUrlInfo(javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getFlowGraphUrlInfo
in 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)
-
-