public abstract class AbstractModem extends Object implements Modem
Modem.CallState, Modem.ModemCapabilities| Constructor and Description |
|---|
AbstractModem() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCapabilities, getCountryOfInstallation, getManufacturerId, getModelId, getObjectId, getRevisionId, getSerialNumberpublic void setGsmExtention(GsmExtention gsmExtention)
setGsmExtention in interface ModemgsmExtention - the gsmExtention to setpublic void setVoiceExtention(VoiceExtention voiceExtention)
setVoiceExtention in interface ModemvoiceExtention - the voiceExtention to setpublic void setFaxExtention(FaxExtention faxExtention)
setFaxExtention in interface ModemfaxExtention - the faxExtention to setpublic GsmExtention getGsmExtention()
getGsmExtention in interface Modempublic VoiceExtention getVoiceExtention()
getVoiceExtention in interface Modempublic FaxExtention getFaxExtention()
getFaxExtention in interface Modempublic boolean sendCommandLineWithPrompt(String command, String data) throws IOException, InterruptedException
sendCommandLineWithPrompt in interface ModemIOExceptionInterruptedExceptionprotected boolean waitForOK(int waitTime)
throws InterruptedException
InterruptedExceptionpublic int getDefaultTrys()
getDefaultTrys in interface Modempublic int getDefaultWaitTime()
ModemgetDefaultWaitTime in interface Modempublic boolean isGsmExtention()
isGsmExtention in interface Modempublic boolean isVoiceExtention()
isVoiceExtention in interface Modempublic boolean isFaxExtention()
isFaxExtention in interface Modempublic void setSpeaker()
setSpeaker in interface Modempublic boolean reset()
throws IOException,
InterruptedException
reset in interface ModemIOExceptionInterruptedExceptionpublic String getAutomaticAnswer() throws IOException, InterruptedException
getAutomaticAnswer in interface ModemIOExceptionInterruptedExceptionpublic String getCommandLineTerminationCharacter() throws IOException, InterruptedException
getCommandLineTerminationCharacter in interface ModemIOExceptionInterruptedExceptionpublic String getResponseFormattingChar() throws IOException, InterruptedException
getResponseFormattingChar in interface ModemIOExceptionInterruptedExceptionpublic String getCommandLineEditingChar() throws IOException, InterruptedException
getCommandLineEditingChar in interface ModemIOExceptionInterruptedExceptionpublic String getModulationSelection() throws IOException, InterruptedException
getModulationSelection in interface ModemIOExceptionInterruptedExceptionpublic Connection dial(String number) throws IOException, InterruptedException
dial in interface ModemIOExceptionInterruptedExceptionpublic void dial(String number, CallHandler waitingOutgoingCall) throws IOException, InterruptedException
dial in interface ModemIOExceptionInterruptedExceptionpublic void setInitStrings(String... initStrings)
setInitStrings in interface Modempublic String getInitString(int i)
i - public int getInitStringCount()
public boolean hangUp()
throws IOException,
InterruptedException
hangUp in interface ModemIOExceptionInterruptedExceptionpublic void reenterDataMode()
reenterDataMode in interface Modemprotected void sendCommandLine(String commandline) throws IOException
IOExceptionpublic RingListener getRingListener()
public void setRingListener(RingListener ringListener)
setRingListener in interface ModemringListener - the ringListener to setpublic boolean sendAndWaitForOK(String cmdLine) throws IOException, InterruptedException
sendAndWaitForOK in interface ModemIOExceptionInterruptedExceptionpublic boolean sendAndWaitForOK(String cmdLine, int trys, int waitTime) throws IOException, InterruptedException
sendAndWaitForOK in interface ModemIOExceptionInterruptedExceptionpublic String[] sendAndEctractData(String cmdLine) throws IOException, InterruptedException
sendAndEctractData in interface ModemIOExceptionInterruptedExceptionpublic String[] sendAndEctractData(String cmdLine, int trys, int waitTime) throws IOException, InterruptedException
sendAndEctractData in interface ModemIOExceptionInterruptedExceptionpublic boolean init()
throws IOException,
InterruptedException
init in interface ModemIOExceptionInterruptedExceptionpublic InputStream getModemInputStream()
public void setModemInputStream(InputStream modemInputStream)
setModemInputStream in interface ModemmodemInputStream - the modemInputStream to setpublic OutputStream getModemOutputStream()
public void setModemOutputStream(OutputStream modemOutputStream)
setModemOutputStream in interface ModemmodemOutputStream - the modemOutputStream to setpublic void setIncommingCallHandler(CallHandler waitingIncommingCall) throws IOException, InterruptedException
setIncommingCallHandler in interface ModemIOExceptionInterruptedExceptionpublic void parsedResultCode(Parser p, ResultCodeToken r)
parsedResultCode in interface Modempublic void parsedRing(Parser p)
parsedRing in interface Modempublic void removeHandler(CallHandler handler)
public void garbageCollected(Parser p, String s)
garbageCollected in interface Modempublic void parsedPrompt(Parser p)
parsedPrompt in interface Modempublic String extractData(String data)
extractData in interface Modempublic boolean init(String... initStrings) throws IOException, InterruptedException
init in interface ModemIOExceptionInterruptedExceptionpublic void removeIncommingCallHandler(CallHandler callHandler)
removeIncommingCallHandler in interface Modempublic String[] getInitStrings()
getInitStrings in interface ModemCopyright © 2009–2015 atmodem4j. All rights reserved.