public class cMsgHandler
extends java.lang.Object
Constructor and Description |
---|
cMsgHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(org.jlab.coda.jevio.EvioEvent event)
Add the given event to the event list.
|
void |
clearList()
Clear the entire event list - all events.
|
void |
clearList(int numberToDelete)
Clear the specified number of latest events from the list.
|
void |
connect(java.lang.String udl)
Connect to the specified cmsg server.
|
javax.swing.JPanel |
createCmsgPanel()
Create the panel/menuitem used to handle communications with a cmsg server.
|
void |
disconnect()
Disconnect from the cMsg server if any connection exists.
|
int |
getCurrentEventIndex()
Get the index of the current event (starting at 0).
|
org.jlab.coda.hipo.CompressionType |
getDataCompressionType()
Get the compression type of data being viewed.
|
org.jlab.coda.jevio.EvioEvent |
getEvent(int index)
Get the specified event, index beginning at 1.
|
Filter |
getEventFilter()
Get the event filter to use on each event before adding to list.
|
int |
getEvioVersion()
Get the evio version of data being viewed.
|
int |
getListLimit()
Get the maximum number of events that the list will hold.
|
int |
getListSize()
Get the size of the event list.
|
org.jlab.coda.jevio.EvioEvent |
getNextEvent()
Get the next evio event from the list or null if none.
|
org.jlab.coda.jevio.EvioEvent |
getPrevEvent()
Get the previous evio event from the list or null if none.
|
java.lang.String |
getSubject()
Get current subscription's subject.
|
java.lang.String |
getType()
Get current subscription's type.
|
boolean |
hasNextEvent()
Is there another evio event, after the one previously obtained, in the list?
|
void |
resetCurrentEventIndex()
Reset the index of the current event to -1.
|
void |
setEventFilter(Filter eventFilter)
Set the event filter to use on each event before adding to list.
|
void |
setEventNum(int eventNum)
Set the event number.
|
void |
setListLimit(int limit)
Set the maximum number of events that the list will hold.
|
boolean |
subscribe(java.lang.String subject,
java.lang.String type)
Subscribe to the given subject and type.
|
public int getEvioVersion()
public org.jlab.coda.hipo.CompressionType getDataCompressionType()
public Filter getEventFilter()
public void setEventFilter(Filter eventFilter)
eventFilter
- filter to use on each event before adding to list.public java.lang.String getSubject()
public java.lang.String getType()
public void disconnect()
public void connect(java.lang.String udl) throws org.jlab.coda.cMsg.cMsgException
udl
- UDL used to specify a cmsg server to connect toorg.jlab.coda.cMsg.cMsgException
- if connection cannot be madepublic boolean subscribe(java.lang.String subject, java.lang.String type) throws org.jlab.coda.cMsg.cMsgException
subject
- subject to subscribe to.type
- type to subscribe to.true
if the subscription exists or was made, else false
.org.jlab.coda.cMsg.cMsgException
- if subscription failspublic void addEvent(org.jlab.coda.jevio.EvioEvent event)
event
- Evio event to add to event list.public org.jlab.coda.jevio.EvioEvent getEvent(int index)
index
- index into event list beginning at 1.public org.jlab.coda.jevio.EvioEvent getNextEvent()
public boolean hasNextEvent()
true
if there is an event, after the one previously obtained,
in the list, else false
.public org.jlab.coda.jevio.EvioEvent getPrevEvent()
public int getListSize()
public int getCurrentEventIndex()
public void resetCurrentEventIndex()
public void setEventNum(int eventNum)
eventNum
- newly added events have numbers starting with this valuepublic void clearList()
public void clearList(int numberToDelete)
numberToDelete
- number of latest events to delete from the list.public int getListLimit()
public void setListLimit(int limit)
limit
- maximum number of events that the list will hold.public javax.swing.JPanel createCmsgPanel()