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.FlowSeriesResponse
getApplicationSeries(long step, Integer N, Set<String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
FlowSummaryResponse
getApplicationSummary(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.FlowSeriesResponse
getConversationSeries(long step, Integer N, Set<String> conversations, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
FlowSummaryResponse
getConversationSummary(Integer N, Set<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)
List<Integer>
getDscpValues(javax.ws.rs.core.UriInfo uriInfo)
protected static List<Filter>
getFiltersFromQueryString(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
Long
getFlowCount(javax.ws.rs.core.UriInfo uriInfo)
Retrieves the number of flows persisted in the repository.FlowNodeDetails
getFlowExporter(Integer nodeId)
Retrieved detailed information about a specific node.List<FlowNodeSummary>
getFlowExporters()
Retrieves a summary of the nodes that have exported flows.String
getFlowGraphUrl()
FlowGraphUrlInfo
getFlowGraphUrlInfo(javax.ws.rs.core.UriInfo uriInfo)
List<String>
getHosts(String regex, long limit, javax.ws.rs.core.UriInfo uriInfo)
Retrieve the list of hosts.FlowSeriesResponse
getHostSeries(long step, Integer N, Set<String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
FlowSummaryResponse
getHostSummary(Integer N, Set<String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
void
setFlowGraphUrl(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: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 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(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 List<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 List<String> getApplications(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(Integer N, Set<String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getApplicationSummary
in interfaceFlowRestService
-
getApplicationSeries
public FlowSeriesResponse getApplicationSeries(long step, Integer N, Set<String> applications, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getApplicationSeries
in interfaceFlowRestService
-
getHosts
public List<String> getHosts(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(Integer N, Set<String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getHostSummary
in interfaceFlowRestService
-
getHostSeries
public FlowSeriesResponse getHostSeries(long step, Integer N, Set<String> hosts, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getHostSeries
in 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: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(Integer N, Set<String> conversations, boolean includeOther, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
getConversationSummary
in interfaceFlowRestService
-
getConversationSeries
public FlowSeriesResponse getConversationSeries(long step, Integer N, Set<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 String getFlowGraphUrl()
-
setFlowGraphUrl
public void setFlowGraphUrl(String flowGraphUrl)
-
-