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, wait
getCapabilities, getCountryOfInstallation, getManufacturerId, getModelId, getObjectId, getRevisionId, getSerialNumber
public void setGsmExtention(GsmExtention gsmExtention)
setGsmExtention
in interface Modem
gsmExtention
- the gsmExtention to setpublic void setVoiceExtention(VoiceExtention voiceExtention)
setVoiceExtention
in interface Modem
voiceExtention
- the voiceExtention to setpublic void setFaxExtention(FaxExtention faxExtention)
setFaxExtention
in interface Modem
faxExtention
- the faxExtention to setpublic GsmExtention getGsmExtention()
getGsmExtention
in interface Modem
public VoiceExtention getVoiceExtention()
getVoiceExtention
in interface Modem
public FaxExtention getFaxExtention()
getFaxExtention
in interface Modem
public boolean sendCommandLineWithPrompt(String command, String data) throws IOException, InterruptedException
sendCommandLineWithPrompt
in interface Modem
IOException
InterruptedException
protected boolean waitForOK(int waitTime) throws InterruptedException
InterruptedException
public int getDefaultTrys()
getDefaultTrys
in interface Modem
public int getDefaultWaitTime()
Modem
getDefaultWaitTime
in interface Modem
public boolean isGsmExtention()
isGsmExtention
in interface Modem
public boolean isVoiceExtention()
isVoiceExtention
in interface Modem
public boolean isFaxExtention()
isFaxExtention
in interface Modem
public void setSpeaker()
setSpeaker
in interface Modem
public boolean reset() throws IOException, InterruptedException
reset
in interface Modem
IOException
InterruptedException
public String getAutomaticAnswer() throws IOException, InterruptedException
getAutomaticAnswer
in interface Modem
IOException
InterruptedException
public String getCommandLineTerminationCharacter() throws IOException, InterruptedException
getCommandLineTerminationCharacter
in interface Modem
IOException
InterruptedException
public String getResponseFormattingChar() throws IOException, InterruptedException
getResponseFormattingChar
in interface Modem
IOException
InterruptedException
public String getCommandLineEditingChar() throws IOException, InterruptedException
getCommandLineEditingChar
in interface Modem
IOException
InterruptedException
public String getModulationSelection() throws IOException, InterruptedException
getModulationSelection
in interface Modem
IOException
InterruptedException
public Connection dial(String number) throws IOException, InterruptedException
dial
in interface Modem
IOException
InterruptedException
public void dial(String number, CallHandler waitingOutgoingCall) throws IOException, InterruptedException
dial
in interface Modem
IOException
InterruptedException
public void setInitStrings(String... initStrings)
setInitStrings
in interface Modem
public String getInitString(int i)
i
- public int getInitStringCount()
public boolean hangUp() throws IOException, InterruptedException
hangUp
in interface Modem
IOException
InterruptedException
public void reenterDataMode()
reenterDataMode
in interface Modem
protected void sendCommandLine(String commandline) throws IOException
IOException
public RingListener getRingListener()
public void setRingListener(RingListener ringListener)
setRingListener
in interface Modem
ringListener
- the ringListener to setpublic boolean sendAndWaitForOK(String cmdLine) throws IOException, InterruptedException
sendAndWaitForOK
in interface Modem
IOException
InterruptedException
public boolean sendAndWaitForOK(String cmdLine, int trys, int waitTime) throws IOException, InterruptedException
sendAndWaitForOK
in interface Modem
IOException
InterruptedException
public String[] sendAndEctractData(String cmdLine) throws IOException, InterruptedException
sendAndEctractData
in interface Modem
IOException
InterruptedException
public String[] sendAndEctractData(String cmdLine, int trys, int waitTime) throws IOException, InterruptedException
sendAndEctractData
in interface Modem
IOException
InterruptedException
public boolean init() throws IOException, InterruptedException
init
in interface Modem
IOException
InterruptedException
public InputStream getModemInputStream()
public void setModemInputStream(InputStream modemInputStream)
setModemInputStream
in interface Modem
modemInputStream
- the modemInputStream to setpublic OutputStream getModemOutputStream()
public void setModemOutputStream(OutputStream modemOutputStream)
setModemOutputStream
in interface Modem
modemOutputStream
- the modemOutputStream to setpublic void setIncommingCallHandler(CallHandler waitingIncommingCall) throws IOException, InterruptedException
setIncommingCallHandler
in interface Modem
IOException
InterruptedException
public void parsedResultCode(Parser p, ResultCodeToken r)
parsedResultCode
in interface Modem
public void parsedRing(Parser p)
parsedRing
in interface Modem
public void removeHandler(CallHandler handler)
public void garbageCollected(Parser p, String s)
garbageCollected
in interface Modem
public void parsedPrompt(Parser p)
parsedPrompt
in interface Modem
public String extractData(String data)
extractData
in interface Modem
public boolean init(String... initStrings) throws IOException, InterruptedException
init
in interface Modem
IOException
InterruptedException
public void removeIncommingCallHandler(CallHandler callHandler)
removeIncommingCallHandler
in interface Modem
public String[] getInitStrings()
getInitStrings
in interface Modem
Copyright © 2009–2015 atmodem4j. All rights reserved.