JSR-043: JTAPI-1.4

javax.telephony.media.provider
Class Signals

java.lang.Object
  |
  +--javax.telephony.media.provider.Signals
All Implemented Interfaces:
SignalConstants

public class Signals
extends java.lang.Object
implements SignalConstants

some static stuff for handling SignalGenerator and SignalDetector.

Since:
JTAPI-1.4

Fields inherited from interface javax.telephony.media.SignalConstants
p_SymbolChar, v_CED, v_CNG, v_DTMF0, v_DTMF1, v_DTMF2, v_DTMF3, v_DTMF4, v_DTMF5, v_DTMF6, v_DTMF7, v_DTMF8, v_DTMF9, v_DTMFA, v_DTMFB, v_DTMFC, v_DTMFD, v_DTMFHash, v_DTMFStar, v_Unknown
 
Constructor Summary
Signals()
           
 
Method Summary
static java.lang.String getSignalName(Symbol sym)
          Retrieve the name for a signal Symbol.
static void setSignalNames(java.lang.Object[] sc)
          Define the String representation for Signal Symbols.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Signals

public Signals()
Method Detail

setSignalNames

public static void setSignalNames(java.lang.Object[] sc)
Define the String representation for Signal Symbols. Used to generate getSignalString();

Generally, we expect the String name to be a single character; but this routine normalizes them all to Strings.

It is possible that a Symbol could be assigned a multi-char String. That could confuse someone who expected getSignalString.charAt(n) to correspond to getSignalBuffer()[n].

Note: the published API for invoking this (p_SymbolChar)a suggests that Character constants should be used; so apps should not easily trip on this.

Parameters:
sc - is array of Objects of the form: {Symbol, String, ...}
See Also:
SignalConstants.p_SymbolChar

getSignalName

public static java.lang.String getSignalName(Symbol sym)
Retrieve the name for a signal Symbol. These Strings are concatenated by getSignalString().
Returns:
a String, generally a single character.
See Also:
SignalDetectorEvent.getSignalString()

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org