Class DialogChannelStatusBean
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final String
A unique value for each R4 device contained by the host.static final String
Release 4 Device Name.static final String
An indication of how many instances of this device is currently opened.static final String
An indication of the type of the device.static final String
Indicates current activity status on the (voice) channel.static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final String[]
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor.DialogChannelStatusBean
(String h, int p) The constructor that will set the host and the port no.DialogChannelStatusBean
(String h, int p, String b) The constructor that will set the host, the port no and the local bind address. -
Method Summary
Modifier and TypeMethodDescriptionvoid
action()
This method starts the action of the bean.children()
Returns the children of the reciever as an Enumeration.boolean
Returns true if the receiver allows children.int
Returns the number of voice channels in the table.Returns the indexes (as Integers) of the voice channels that are open.getChannelName
(Integer index) Returns the name of the channel.int
getChannelStatus
(Integer index) Returns the status of the channel as an int.getChannelStatusString
(Integer index) Returns the String representation of the status of the channel.getChildAt
(int childIndex) Returns the childTreeNode
at indexchildIndex
.int
Returns the number of childrenTreeNode
s the receiver contains.int
Returns the index ofnode
in the receivers children.Returns the date of the moment when this bean was last updated.Returns the parentTreeNode
of the receiver.boolean
isLeaf()
Returns true if the receiver is a leaf.void
run()
Implements the running of the bean.void
Sets the DefaultTreeModel for this TreeNode.void
Sets the parent for this TreeNode.void
update
(Observable obs, Object ov) This method is called when the Pdu response is received.Methods inherited from class uk.co.westhawk.snmp.beans.SNMPRunBean
getUpdateInterval, isRunning, setRunning, setUpdateInterval, setUpdateInterval
Methods inherited from class uk.co.westhawk.snmp.beans.SNMPBean
addPropertyChangeListener, getBindAddress, getCommunityName, getHost, getMessage, getPort, getSocketType, removePropertyChangeListener, setBindAddress, setCommunityName, setHost, setPort, setPort, setSocketType
-
Field Details
-
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
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
An indication of the type of the device.- other - some other type of device unknown to the agent.
- voice - A voice channel device. An entry exits in the dlgR4VoiceTable for this device.
- dti - A DTI timeslot device. An entry exits in the dlgR4DTITable for this device.
- isdn - An ISDN B-Channel device. An entry exits in the dlgR4ISDNTable for this device.
- msi - An MSI station set device. An entry exits in the dlgR4MSITable for this device.
- See Also:
-
dlgR4DeviceOpenCount
An indication of how many instances of this device is currently opened. See the dlgr4dev.mib.- See Also:
-
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
-
-
Constructor Details
-
DialogChannelStatusBean
public DialogChannelStatusBean()The default constructor. -
DialogChannelStatusBean
The constructor that will set the host and the port no.- Parameters:
h
- the hostnamep
- the port no- See Also:
-
DialogChannelStatusBean
The constructor that will set the host, the port no and the local bind address.- Parameters:
h
- the hostnamep
- the port nob
- the local bind address- Since:
- 4_14
- See Also:
-
-
Method Details
-
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
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. -
getChannelCount
public int getChannelCount()Returns the number of voice channels in the table. -
getChannelName
Returns the name of the channel.- Parameters:
index
- The index of the channel- Returns:
- The name
-
getChannelStatus
Returns the status of the channel as an int.- Parameters:
index
- The index of the channel- Returns:
- The status
- See Also:
-
getChannelStatusString
Returns the String representation of the status of the channel.- Parameters:
index
- The index of the channel- Returns:
- The status
- See Also:
-
children
Returns the children of the reciever as an Enumeration. -
getChildCount
public int getChildCount()Returns the number of childrenTreeNode
s the receiver contains.- Specified by:
getChildCount
in interfaceTreeNode
-
getChildAt
Returns the childTreeNode
at indexchildIndex
.- Specified by:
getChildAt
in interfaceTreeNode
-
getIndex
Returns the index ofnode
in the receivers children. If the receiver does not containnode
, -1 will be returned. -
getParent
Returns the parentTreeNode
of the receiver. -
getAllowsChildren
public boolean getAllowsChildren()Returns true if the receiver allows children.- Specified by:
getAllowsChildren
in interfaceTreeNode
-
isLeaf
public boolean isLeaf()Returns true if the receiver is a leaf. -
action
public void action()This method starts the action of the bean. It will initialises all variables before starting. -
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 interfaceRunnable
- Specified by:
run
in classSNMPRunBean
- See Also:
-
update
This method is called when the Pdu response is received. When all answers are received it will fire the property change event. -
setParent
Sets the parent for this TreeNode. If the parent is not set, this class should be the root of the TreeModel. -
setDefaultTreeModel
Sets the DefaultTreeModel for this TreeNode. The tree model is used for notifying when any of the nodes were added, removed or changed.
-