|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--cnrg.itx.gtwy.ListenChannel
Takes care of servicing incoming calls from the phone. Sets up a connection with a computer if a call has been accepted. Services the next incoming phone call when the connection ends or the previous call has been rejected.
Field Summary | |
private Gateway |
myGate
The Gateway instance. |
private Line |
myLine
The Line instance corresponding to ListenChannel's line. |
Fields inherited from class java.lang.Thread |
contextClassLoader,
daemon,
eetop,
group,
inheritedAccessControlContext,
MAX_PRIORITY,
MIN_PRIORITY,
name,
NORM_PRIORITY,
priority,
single_step,
stillborn,
stopThreadPermission,
target,
threadInitNumber,
threadQ,
values |
Constructor Summary | |
protected |
ListenChannel(Line lin,
Gateway g)
|
Method Summary | |
(package private) static void |
|
private java.lang.String |
getExtension(int chDev,
boolean isSecondTime)
This is where the channel gets the phone's requested extension number. |
protected void |
makeWait()
Puts the ListenChannel to "sleep". |
private void |
rejectCallMessage(int chDev)
Plays out a message to a phone when a call has been rejected. |
protected void |
restart()
"Wakes up" the ListenChannel to listen for the next incoming call. |
void |
run()
|
private void |
waitForCall(int chDev)
Sets up the channel to wait for a phone to dial in. |
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
exit,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
init,
interrupt,
interrupt0,
interrupted,
isAlive,
isDaemon,
isInterrupted,
isInterrupted,
join,
join,
join,
nextThreadNum,
registerNatives,
resume,
resume0,
setContextClassLoader,
setDaemon,
setName,
setPriority,
setPriority0,
sleep,
sleep,
start,
stop,
stop,
stop0,
suspend,
suspend0,
toString,
yield |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
private Line myLine
private Gateway myGate
Constructor Detail |
protected ListenChannel(Line lin, Gateway g)
lin
- the Line
instance corresponding to ListenChannel's
line.
Provides information concerning that line.g
- the Gateway
instance to access line state.Line
,
Gateway
Method Detail |
static void()
protected void makeWait()
ListenChannel
to "sleep". Used when a connection is being set up.Gateway.setUpConnection(Line, Connection)
protected void restart()
ListenChannel
to listen for the next incoming call.public void run()
Runnable
private void waitForCall(int chDev)
chDev
- the channel's device handler.private java.lang.String getExtension(int chDev, boolean isSecondTime)
chDev
- the channel's device handler.isSecondTime
- true if this is not the first call to getExtension during session.private void rejectCallMessage(int chDev)
chDev
- the channel's device handler.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |