a1c142f3895d32c2d4c0a237522261972f479462
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.pcap.core / src / org / eclipse / tracecompass / internal / tmf / pcap / core / signal / TmfPacketStreamSelectedSignal.java
1 /*******************************************************************************
2 * Copyright (c) 2014 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Vincent Perot - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.internal.tmf.pcap.core.signal;
14
15 import org.eclipse.jdt.annotation.Nullable;
16 import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStream;
17 import org.eclipse.tracecompass.tmf.core.signal.TmfSignal;
18
19 /**
20 * TmfSignal that is broadcasted when a new packet stream is chosen. Views that
21 * are network-specific can uses this signal to track when the user selects a
22 * new stream.
23 *
24 * @author Vincent Perot
25 */
26 public class TmfPacketStreamSelectedSignal extends TmfSignal {
27
28 private final @Nullable TmfPacketStream fStream;
29
30 /**
31 * Standard constructor
32 *
33 * @param source
34 * Object sending this signal
35 * @param reference
36 * Reference index to assign to this signal
37 * @param stream
38 * The new stream. It can be null if the user cleared the
39 * selection.
40 */
41 public TmfPacketStreamSelectedSignal(Object source, int reference, @Nullable TmfPacketStream stream) {
42 super(source, reference);
43 fStream = stream;
44 }
45
46 /**
47 * Getter method that returns the stream.
48 *
49 * @return The stream.
50 */
51 public @Nullable TmfPacketStream getStream() {
52 return fStream;
53 }
54 }
This page took 0.047729 seconds and 4 git commands to generate.