Class DialogChannelStatusBean

All Implemented Interfaces:
Runnable, Observer, TreeNode

public class DialogChannelStatusBean extends SNMPRunBean implements Observer, TreeNode

This bean is written for a Dialogic card. The Dialogic MIBs come with their BoardWatch package. You will have to fill in a form before downloading it.

This bean collects information about the voice channel status of the Dialogic card. It will only collect those channels that are open.

You can get the data via the getChannelIndexes() and getChannelStatus(Integer index) methods. This way you can visualise the data yourself.

You can also use the Swing JTree to visualise the channels. This bean implements the Swing TreeNode interface. The user has to set the setDefaultTreeModel, so this class can update all the nodes that are added, removed of changed. If this class is not the root of the JTree, you have to set the (TreeNode) parent of this class.

The properties in the parent classes should be set, before calling the action() method. Via a TreeModelEvent the application/applet will be notified.

We only have one (1) Dialogics card, so I don't know how and if it works with more than 1 card. Please let us know if it doesn't work.

Version:
$Revision: 1.18 $ $Date: 2006/02/02 15:49:39 $
Author:
Birgit Arkesteijn
See Also:
  • Field Details

    • dlgR4DeviceIndex

      public static final String dlgR4DeviceIndex
      A unique value for each R4 device contained by the host. The value for each R4 device must remain constant at least from one re-initialization of the agent to the next re-initialization. See the dlgr4dev.mib.
      See Also:
    • dlgR4DeviceName

      public static final String dlgR4DeviceName
      Release 4 Device Name. This is the name the application will use when opening the device (e.g. dxxxB1C1, dtiB1T1, msiB1C1) See the dlgr4dev.mib.
      See Also:
    • dlgR4DeviceType

      public static final String dlgR4DeviceType
      An indication of the type of the device.
      1. other - some other type of device unknown to the agent.
      2. voice - A voice channel device. An entry exits in the dlgR4VoiceTable for this device.
      3. dti - A DTI timeslot device. An entry exits in the dlgR4DTITable for this device.
      4. isdn - An ISDN B-Channel device. An entry exits in the dlgR4ISDNTable for this device.
      5. msi - An MSI station set device. An entry exits in the dlgR4MSITable for this device.
      See the dlgr4dev.mib.
      See Also:
    • dlgR4DeviceOpenCount

      public static final String dlgR4DeviceOpenCount
      An indication of how many instances of this device is currently opened. See the dlgr4dev.mib.
      See Also:
    • dlgR4VoiceChannelStatus

      public static final String dlgR4VoiceChannelStatus
      Indicates current activity status on the (voice) channel. See the dlgr4dev.mib.
      See Also:
    • unknown

      public static final int unknown
      See Also:
    • voice

      public static final int voice
      See Also:
    • dti

      public static final int dti
      See Also:
    • isdn

      public static final int isdn
      See Also:
    • msi

      public static final int msi
      See Also:
    • idle

      public static final int idle
      See Also:
    • playing

      public static final int playing
      See Also:
    • recording

      public static final int recording
      See Also:
    • gettingDigits

      public static final int gettingDigits
      See Also:
    • blocked

      public static final int blocked
      See Also:
    • dialing

      public static final int dialing
      See Also:
    • playTone

      public static final int playTone
      See Also:
    • sendingFax

      public static final int sendingFax
      See Also:
    • receivingFax

      public static final int receivingFax
      See Also:
    • betweenFAXPages

      public static final int betweenFAXPages
      See Also:
    • hookState

      public static final int hookState
      See Also:
    • winking

      public static final int winking
      See Also:
    • callProgess

      public static final int callProgess
      See Also:
    • gettingR2MF

      public static final int gettingR2MF
      See Also:
    • vch_status

      public static final String[] vch_status
  • Constructor Details

  • Method Details

    • getLastUpdateDate

      public Date getLastUpdateDate()
      Returns the date of the moment when this bean was last updated. This might be null when the first time the update was not finished.
      Returns:
      the last update date
    • getChannelIndexes

      public Enumeration getChannelIndexes()
      Returns the indexes (as Integers) of the voice channels that are open. Only the open voice channels of the card are saved. Use getChannelStatus() or getChannelStatusString() to get the status of the channel.
      See Also:
    • getChannelCount

      public int getChannelCount()
      Returns the number of voice channels in the table.
    • getChannelName

      public String getChannelName(Integer index)
      Returns the name of the channel.
      Parameters:
      index - The index of the channel
      Returns:
      The name
    • getChannelStatus

      public int getChannelStatus(Integer index)
      Returns the status of the channel as an int.
      Parameters:
      index - The index of the channel
      Returns:
      The status
      See Also:
    • getChannelStatusString

      public String getChannelStatusString(Integer index)
      Returns the String representation of the status of the channel.
      Parameters:
      index - The index of the channel
      Returns:
      The status
      See Also:
    • children

      public Enumeration children()
      Returns the children of the reciever as an Enumeration.
      Specified by:
      children in interface TreeNode
    • getChildCount

      public int getChildCount()
      Returns the number of children TreeNodes the receiver contains.
      Specified by:
      getChildCount in interface TreeNode
    • getChildAt

      public TreeNode getChildAt(int childIndex)
      Returns the child TreeNode at index childIndex.
      Specified by:
      getChildAt in interface TreeNode
    • getIndex

      public int getIndex(TreeNode node)
      Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.
      Specified by:
      getIndex in interface TreeNode
    • getParent

      public TreeNode getParent()
      Returns the parent TreeNode of the receiver.
      Specified by:
      getParent in interface TreeNode
    • getAllowsChildren

      public boolean getAllowsChildren()
      Returns true if the receiver allows children.
      Specified by:
      getAllowsChildren in interface TreeNode
    • isLeaf

      public boolean isLeaf()
      Returns true if the receiver is a leaf.
      Specified by:
      isLeaf in interface TreeNode
    • action

      public void action()
      This method starts the action of the bean. It will initialises all variables before starting.
      Specified by:
      action in class SNMPBean
    • run

      public void run()
      Implements the running of the bean. It will send the Pdu, if the previous one is not still in flight.
      Specified by:
      run in interface Runnable
      Specified by:
      run in class SNMPRunBean
      See Also:
    • update

      public void update(Observable obs, Object ov)
      This method is called when the Pdu response is received. When all answers are received it will fire the property change event.
      Specified by:
      update in interface Observer
    • setParent

      public void setParent(TreeNode p)
      Sets the parent for this TreeNode. If the parent is not set, this class should be the root of the TreeModel.
    • setDefaultTreeModel

      public void setDefaultTreeModel(DefaultTreeModel model)
      Sets the DefaultTreeModel for this TreeNode. The tree model is used for notifying when any of the nodes were added, removed or changed.