|
SNMP Stack 4_12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.co.westhawk.snmp.beans.SNMPBean | +--uk.co.westhawk.snmp.beans.SNMPRunBean | +--uk.co.westhawk.snmp.beans.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.
SNMPBean.setHost(java.lang.String)
,
SNMPBean.setPort(int)
,
SNMPBean.setCommunityName(java.lang.String)
,
SNMPRunBean.setUpdateInterval(int)
,
SNMPBean.addPropertyChangeListener(java.beans.PropertyChangeListener)
,
SNMPBean.action()
,
GetNextPdu_vec
Field Summary | |
static int |
betweenFAXPages
|
static int |
blocked
|
static int |
callProgess
|
static int |
dialing
|
static java.lang.String |
dlgR4DeviceIndex
A unique value for each R4 device contained by the host. |
static java.lang.String |
dlgR4DeviceName
Release 4 Device Name. |
static java.lang.String |
dlgR4DeviceOpenCount
An indication of how many instances of this device is currently opened. |
static java.lang.String |
dlgR4DeviceType
An indication of the type of the device. |
static java.lang.String |
dlgR4VoiceChannelStatus
Indicates current activity status on the (voice) channel. |
static int |
dti
|
static int |
gettingDigits
|
static int |
gettingR2MF
|
static int |
hookState
|
static int |
idle
|
static int |
isdn
|
static int |
msi
|
static int |
playing
|
static int |
playTone
|
static int |
receivingFax
|
static int |
recording
|
static int |
sendingFax
|
static int |
unknown
|
static java.lang.String[] |
vch_status
|
static int |
voice
|
static int |
winking
|
Fields inherited from class uk.co.westhawk.snmp.beans.SNMPRunBean |
interval, me, running |
Fields inherited from class uk.co.westhawk.snmp.beans.SNMPBean |
community, context, host, message, port, propertyChangeListener |
Constructor Summary | |
DialogChannelStatusBean()
The default constructor. |
|
DialogChannelStatusBean(java.lang.String h,
int p)
The constructor that will set the host and the port no. |
Method Summary | |
void |
action()
This method starts the action of the bean. |
java.util.Enumeration |
children()
Returns the children of the reciever as an Enumeration. |
protected void |
fireTreeModelChanged()
Fire the property event. |
boolean |
getAllowsChildren()
Returns true if the receiver allows children. |
int |
getChannelCount()
Returns the number of voice channels in the table. |
java.util.Enumeration |
getChannelIndexes()
Returns the indexes (as Integers) of the voice channels that are open. |
java.lang.String |
getChannelName(java.lang.Integer index)
Returns the name of the channel. |
int |
getChannelStatus(java.lang.Integer index)
Returns the status of the channel as an int. |
java.lang.String |
getChannelStatusString(java.lang.Integer index)
Returns the String representation of the status of the channel. |
javax.swing.tree.TreeNode |
getChildAt(int childIndex)
Returns the child TreeNode at index
childIndex . |
int |
getChildCount()
Returns the number of children TreeNode s the receiver
contains. |
int |
getIndex(javax.swing.tree.TreeNode node)
Returns the index of node in the receivers children. |
java.util.Date |
getLastUpdateDate()
Returns the date of the moment when this bean was last updated. |
javax.swing.tree.TreeNode |
getParent()
Returns the parent TreeNode of the receiver. |
boolean |
isLeaf()
Returns true if the receiver is a leaf. |
void |
run()
Implements the running of the bean. |
void |
setDefaultTreeModel(javax.swing.tree.DefaultTreeModel model)
Sets the DefaultTreeModel for this TreeNode. |
void |
setParent(javax.swing.tree.TreeNode p)
Sets the parent for this TreeNode. |
void |
update(java.util.Observable obs,
java.lang.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, firePropertyChange, getCommunityName, getHost, getMessage, getPort, isHostPortReachable, removePropertyChangeListener, setCommunityName, setHost, setMessage, setPort, setPort |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String dlgR4DeviceIndex
public static final java.lang.String dlgR4DeviceName
public static final java.lang.String dlgR4DeviceType
public static final java.lang.String dlgR4DeviceOpenCount
public static final java.lang.String dlgR4VoiceChannelStatus
public static final int unknown
public static final int voice
public static final int dti
public static final int isdn
public static final int msi
public static final int idle
public static final int playing
public static final int recording
public static final int gettingDigits
public static final int blocked
public static final int dialing
public static final int playTone
public static final int sendingFax
public static final int receivingFax
public static final int betweenFAXPages
public static final int hookState
public static final int winking
public static final int callProgess
public static final int gettingR2MF
public static final java.lang.String[] vch_status
Constructor Detail |
public DialogChannelStatusBean()
public DialogChannelStatusBean(java.lang.String h, int p)
h
- the hostnamep
- the port noSNMPBean.setHost(java.lang.String)
,
SNMPBean.setPort(int)
Method Detail |
public java.util.Date getLastUpdateDate()
public java.util.Enumeration getChannelIndexes()
getChannelStatus(java.lang.Integer)
,
getChannelStatusString(java.lang.Integer)
public int getChannelCount()
public java.lang.String getChannelName(java.lang.Integer index)
index
- The index of the channelpublic int getChannelStatus(java.lang.Integer index)
index
- The index of the channelgetChannelIndexes()
public java.lang.String getChannelStatusString(java.lang.Integer index)
index
- The index of the channelgetChannelIndexes()
public java.util.Enumeration children()
children
in interface javax.swing.tree.TreeNode
public int getChildCount()
TreeNode
s the receiver
contains.getChildCount
in interface javax.swing.tree.TreeNode
public javax.swing.tree.TreeNode getChildAt(int childIndex)
TreeNode
at index
childIndex
.getChildAt
in interface javax.swing.tree.TreeNode
public int getIndex(javax.swing.tree.TreeNode node)
node
in the receivers children.
If the receiver does not contain node
, -1 will be
returned.getIndex
in interface javax.swing.tree.TreeNode
public javax.swing.tree.TreeNode getParent()
TreeNode
of the receiver.getParent
in interface javax.swing.tree.TreeNode
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
public boolean isLeaf()
isLeaf
in interface javax.swing.tree.TreeNode
public void action()
action
in class SNMPBean
public void run()
run
in class SNMPRunBean
SNMPRunBean.isRunning()
public void update(java.util.Observable obs, java.lang.Object ov)
update
in interface java.util.Observer
public void setParent(javax.swing.tree.TreeNode p)
public void setDefaultTreeModel(javax.swing.tree.DefaultTreeModel model)
protected void fireTreeModelChanged()
DefaultTreeModel.nodeStructureChanged(javax.swing.tree.TreeNode)
|
SNMP Stack 4_12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |