Search in sources :

Example 1 with TransmissionPrivateDataEntry

use of com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry in project VideoOptimzer by attdevsupport.

the class BpSecurityTransmissionPrivateDataTablePanel method getContentTable.

@SuppressWarnings("unchecked")
@Override
public DataTable<TransmissionPrivateDataEntry> getContentTable() {
    if (contentTable == null) {
        contentTable = new DataTable<TransmissionPrivateDataEntry>(tableModel);
        contentTable.setName(ResourceBundleHelper.getMessageString("security.private.data.transmission.tableName"));
        contentTable.setAutoCreateRowSorter(true);
        contentTable.setGridColor(Color.LIGHT_GRAY);
        contentTable.setRowHeight(ROW_HEIGHT);
        contentTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
        TableRowSorter<TableModel> sorter = new TableRowSorter<>(tableModel);
        contentTable.setRowSorter(sorter);
        sorter.setComparator(0, Util.getDomainSorter());
        DataTablePopupMenu popupMenu = (DataTablePopupMenu) contentTable.getPopup();
        popupMenu.initialize();
    }
    return contentTable;
}
Also used : TransmissionPrivateDataEntry(com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry) DataTablePopupMenu(com.att.aro.ui.model.DataTablePopupMenu) TransmissionPrivateDataTableModel(com.att.aro.ui.model.bestpractice.TransmissionPrivateDataTableModel) TableModel(javax.swing.table.TableModel) TableRowSorter(javax.swing.table.TableRowSorter)

Example 2 with TransmissionPrivateDataEntry

use of com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry in project VideoOptimzer by attdevsupport.

the class ARODiagnosticsOverviewRouteImpl method updateDiagnosticsTab.

@Override
public void updateDiagnosticsTab(Object routeInfo) {
    int oldPanelIndex = jtabbedPane.getSelectedIndex();
    jtabbedPane.setSelectedIndex(DIAGNOSTIC_INDEX);
    DiagnosticsTab diagnosticsTab = (DiagnosticsTab) jtabbedPane.getSelectedComponent();
    if (routeInfo == null) {
        jtabbedPane.setSelectedIndex(oldPanelIndex);
        LOG.error("Diagnostics Tab needs a type for updating");
        return;
    }
    LOG.debug("Type used to route to Diagnostics Tab: " + routeInfo.getClass().getSimpleName());
    if (routeInfo instanceof CacheEntry) {
        diagnosticsTab.setHighlightedTCP(((CacheEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof Session) {
        diagnosticsTab.setHighlightedTCP(((Session) routeInfo));
    } else if (routeInfo instanceof HttpRequestResponseInfo) {
        diagnosticsTab.setHighlightedTCP((HttpRequestResponseInfo) routeInfo);
    } else if (routeInfo instanceof HttpEntry) {
        diagnosticsTab.setHighlightedTCP(((HttpEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof DisplayNoneInCSSEntry) {
        diagnosticsTab.setHighlightedTCP(((DisplayNoneInCSSEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof ImageMdataEntry) {
        diagnosticsTab.setHighlightedTCP(((ImageMdataEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof ImageCompressionEntry) {
        diagnosticsTab.setHighlightedTCP(((ImageCompressionEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof MultipleConnectionsEntry) {
        if (((MultipleConnectionsEntry) routeInfo).isMultiple()) {
            jtabbedPane.setSelectedIndex(WATERFALL_INDEX);
            WaterfallTab waterfallTab = (WaterfallTab) jtabbedPane.getSelectedComponent();
            waterfallTab.updateGraph(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
        } else {
            if (((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo().getSession() != null) {
                diagnosticsTab.setHighlightedSessionTCP(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
            } else {
                diagnosticsTab.setHighlightedTCP(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
            }
        }
    } else if (routeInfo instanceof SpriteImageEntry) {
        diagnosticsTab.setHighlightedTCP(((SpriteImageEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof UnnecessaryConnectionEntry) {
        UnnecessaryConnectionEntry unConnectionEntry = (UnnecessaryConnectionEntry) routeInfo;
        diagnosticsTab.setHighlightedTCP(unConnectionEntry.getLowTime());
    } else if (routeInfo instanceof TransmissionPrivateDataEntry || routeInfo instanceof UnsecureSSLVersionEntry || routeInfo instanceof ForwardSecrecyEntry) {
        diagnosticsTab.setHighlightedTCP(routeInfo);
    } else if (routeInfo instanceof VideoStall) {
        double timestamp = ((VideoStall) routeInfo).getSegmentTryingToPlay().getStartTS();
        diagnosticsTab.getGraphPanel().setGraphView(timestamp, true);
        diagnosticsTab.getVideoPlayer().setMediaTime(timestamp);
    } else {
        jtabbedPane.setSelectedIndex(oldPanelIndex);
        LOG.error("Diagnostics Tab cannot handle a type of " + routeInfo.getClass().getSimpleName() + " for updating");
    }
}
Also used : ImageMdataEntry(com.att.aro.core.bestpractice.pojo.ImageMdataEntry) TransmissionPrivateDataEntry(com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry) MultipleConnectionsEntry(com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry) HttpRequestResponseInfo(com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo) DisplayNoneInCSSEntry(com.att.aro.core.bestpractice.pojo.DisplayNoneInCSSEntry) DiagnosticsTab(com.att.aro.ui.view.diagnostictab.DiagnosticsTab) CacheEntry(com.att.aro.core.packetanalysis.pojo.CacheEntry) UnnecessaryConnectionEntry(com.att.aro.core.bestpractice.pojo.UnnecessaryConnectionEntry) ForwardSecrecyEntry(com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry) HttpEntry(com.att.aro.core.bestpractice.pojo.HttpEntry) ImageCompressionEntry(com.att.aro.core.bestpractice.pojo.ImageCompressionEntry) UnsecureSSLVersionEntry(com.att.aro.core.bestpractice.pojo.UnsecureSSLVersionEntry) WaterfallTab(com.att.aro.ui.view.waterfalltab.WaterfallTab) SpriteImageEntry(com.att.aro.core.bestpractice.pojo.SpriteImageEntry) Session(com.att.aro.core.packetanalysis.pojo.Session) VideoStall(com.att.aro.core.packetanalysis.pojo.VideoStall)

Example 3 with TransmissionPrivateDataEntry

use of com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry in project VideoOptimzer by attdevsupport.

the class TransmissionPrivateDataImpl method search.

/**
 * searching method depends on the type of searching handler (exact keyword searching or pattern searching)
 * @param sessions
 * @param handler
 * @param privateDataSet
 * @return
 */
private List<TransmissionPrivateDataEntry> search(List<Session> sessions, ISearchingHandler handler, Map<String, String> privateDataSet) {
    List<TransmissionPrivateDataEntry> entries = new LinkedList<>();
    SearchingPattern pattern = getSearchingPattern(handler, privateDataSet);
    if (pattern.isEmpty()) {
        return entries;
    }
    for (Session session : sessions) {
        SearchingContent content = getContent(session);
        SearchingResult result = handler.search(pattern, content);
        List<String> wordsFound = result.getWords();
        List<String> types = result.getTypes();
        for (int i = 0; i < wordsFound.size(); i++) {
            entries.add(populateEntry(session, wordsFound.get(i), types.get(i)));
        }
    }
    return entries;
}
Also used : TransmissionPrivateDataEntry(com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry) SearchingResult(com.att.aro.core.searching.pojo.SearchingResult) SearchingContent(com.att.aro.core.searching.pojo.SearchingContent) SearchingPattern(com.att.aro.core.searching.pojo.SearchingPattern) LinkedList(java.util.LinkedList) Session(com.att.aro.core.packetanalysis.pojo.Session)

Example 4 with TransmissionPrivateDataEntry

use of com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry in project VideoOptimzer by attdevsupport.

the class TransmissionPrivateDataImpl method populateEntry.

/**
 * populate data for displaying table entry in the UI
 * @param session
 * @param word
 * @return
 */
private TransmissionPrivateDataEntry populateEntry(Session session, String word, String type) {
    TransmissionPrivateDataEntry entry = new TransmissionPrivateDataEntry();
    entry.setDestIP(session.getRemoteIP().getHostAddress());
    entry.setDomainName(getDomainName(session));
    entry.setDestPort(session.getRemotePort());
    entry.setPrivateDataType(type);
    entry.setPrivateDataTxt(word);
    entry.setSessionStartTime(session.getSessionStartTime());
    return entry;
}
Also used : TransmissionPrivateDataEntry(com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry)

Example 5 with TransmissionPrivateDataEntry

use of com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry in project VideoOptimzer by attdevsupport.

the class DiagnosticsTab method setHighlightedTCP.

// only for security best practice table route
public void setHighlightedTCP(Object routeInfo) {
    double timestamp = -1;
    String destIP = null;
    if (routeInfo instanceof TransmissionPrivateDataEntry) {
        TransmissionPrivateDataEntry entry = (TransmissionPrivateDataEntry) routeInfo;
        timestamp = entry.getSessionStartTime();
        destIP = entry.getDestIP();
    } else if (routeInfo instanceof UnsecureSSLVersionEntry) {
        UnsecureSSLVersionEntry entry = (UnsecureSSLVersionEntry) routeInfo;
        timestamp = entry.getSessionStartTime();
        destIP = entry.getDestIP();
    } else if (routeInfo instanceof ForwardSecrecyEntry) {
        ForwardSecrecyEntry entry = (ForwardSecrecyEntry) routeInfo;
        timestamp = entry.getSessionStartTime();
        destIP = entry.getDestIP();
    }
    if (timestamp == -1 || destIP == null) {
        LOGGER.warn("invalid route information");
        return;
    }
    for (Session session : sessionsSortedByTimestamp) {
        if (session != null && session.getRemoteIP() != null) {
            if (session.getSessionStartTime() == timestamp && destIP.equals(session.getRemoteIP().getHostAddress())) {
                setHighlightedTCP(session);
                return;
            }
        }
    }
    LOGGER.warn("No session found to route to Diagnostic Tab for timestamp " + timestamp);
}
Also used : ForwardSecrecyEntry(com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry) TransmissionPrivateDataEntry(com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry) UnsecureSSLVersionEntry(com.att.aro.core.bestpractice.pojo.UnsecureSSLVersionEntry) HttpRequestResponseInfoWithSession(com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfoWithSession) Session(com.att.aro.core.packetanalysis.pojo.Session)

Aggregations

TransmissionPrivateDataEntry (com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry)5 Session (com.att.aro.core.packetanalysis.pojo.Session)3 ForwardSecrecyEntry (com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry)2 UnsecureSSLVersionEntry (com.att.aro.core.bestpractice.pojo.UnsecureSSLVersionEntry)2 DisplayNoneInCSSEntry (com.att.aro.core.bestpractice.pojo.DisplayNoneInCSSEntry)1 HttpEntry (com.att.aro.core.bestpractice.pojo.HttpEntry)1 ImageCompressionEntry (com.att.aro.core.bestpractice.pojo.ImageCompressionEntry)1 ImageMdataEntry (com.att.aro.core.bestpractice.pojo.ImageMdataEntry)1 MultipleConnectionsEntry (com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry)1 SpriteImageEntry (com.att.aro.core.bestpractice.pojo.SpriteImageEntry)1 UnnecessaryConnectionEntry (com.att.aro.core.bestpractice.pojo.UnnecessaryConnectionEntry)1 CacheEntry (com.att.aro.core.packetanalysis.pojo.CacheEntry)1 HttpRequestResponseInfo (com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo)1 HttpRequestResponseInfoWithSession (com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfoWithSession)1 VideoStall (com.att.aro.core.packetanalysis.pojo.VideoStall)1 SearchingContent (com.att.aro.core.searching.pojo.SearchingContent)1 SearchingPattern (com.att.aro.core.searching.pojo.SearchingPattern)1 SearchingResult (com.att.aro.core.searching.pojo.SearchingResult)1 DataTablePopupMenu (com.att.aro.ui.model.DataTablePopupMenu)1 TransmissionPrivateDataTableModel (com.att.aro.ui.model.bestpractice.TransmissionPrivateDataTableModel)1