public class ModelInterpreter extends Object implements Runnable, SimulatedRadioControl
Constructor and Description |
---|
ModelInterpreter(InetSocketAddress sa) |
ModelInterpreter(InputStream in,
OutputStream out) |
Modifier and Type | Method and Description |
---|---|
void |
pauseResponses()
Pause responses to async requests until (ref-counted) resumeResponses()
|
void |
progressConnectingCallState()
If a call is DIALING or ALERTING, progress it to the next state
|
void |
progressConnectingToActive()
If a call is DIALING or ALERTING, progress it all the way to ACTIVE
|
void |
resumeResponses()
see pauseResponses
|
void |
run()
When an object implementing interface
Runnable is used
to create a thread, starting the thread causes the object's
run method to be called in that separately executing
thread. |
void |
sendUnsolicited(String unsol) |
void |
setAutoProgressConnectingCall(boolean b)
automatically progress mobile originated calls to ACTIVE.
|
void |
setNextCallFailCause(int gsmCause) |
void |
setNextDialFailImmediately(boolean b) |
void |
shutdown() |
void |
triggerHangupAll()
hangup all
|
void |
triggerHangupBackground()
hangup holding calls
|
void |
triggerHangupForeground()
hangup ringing, dialing, or actuve calls
|
void |
triggerIncomingSMS(String message) |
void |
triggerIncomingUssd(String statusCode,
String message)
Generates an incoming USSD message.
|
void |
triggerRing(String number)
Start the simulated phone ringing
|
void |
triggerSsn(int a,
int b) |
public ModelInterpreter(InputStream in, OutputStream out)
public ModelInterpreter(InetSocketAddress sa) throws IOException
IOException
public void run()
Runnable
Runnable
is used
to create a thread, starting the thread causes the object's
run
method to be called in that separately executing
thread.
The general contract of the method run
is that it may
take any action whatsoever.
run
in interface Runnable
Thread.run()
public void triggerRing(String number)
triggerRing
in interface SimulatedRadioControl
public void progressConnectingCallState()
progressConnectingCallState
in interface SimulatedRadioControl
public void progressConnectingToActive()
progressConnectingToActive
in interface SimulatedRadioControl
public void setAutoProgressConnectingCall(boolean b)
setAutoProgressConnectingCall
in interface SimulatedRadioControl
public void setNextDialFailImmediately(boolean b)
setNextDialFailImmediately
in interface SimulatedRadioControl
public void setNextCallFailCause(int gsmCause)
setNextCallFailCause
in interface SimulatedRadioControl
public void triggerHangupForeground()
triggerHangupForeground
in interface SimulatedRadioControl
public void triggerHangupBackground()
triggerHangupBackground
in interface SimulatedRadioControl
public void triggerHangupAll()
triggerHangupAll
in interface SimulatedRadioControl
public void sendUnsolicited(String unsol)
public void triggerSsn(int a, int b)
triggerSsn
in interface SimulatedRadioControl
public void triggerIncomingUssd(String statusCode, String message)
SimulatedRadioControl
triggerIncomingUssd
in interface SimulatedRadioControl
public void triggerIncomingSMS(String message)
triggerIncomingSMS
in interface SimulatedRadioControl
public void pauseResponses()
SimulatedRadioControl
pauseResponses
in interface SimulatedRadioControl
public void resumeResponses()
SimulatedRadioControl
resumeResponses
in interface SimulatedRadioControl
public void shutdown()
shutdown
in interface SimulatedRadioControl