|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.marre.sms.transport.gsm.GsmTransport
An SmsTransport that sends the SMS from an GSM phone that is attached to the serial port.
This transport supports the following parameters:
sms.gsm.appname - Application name to use when registering the comport sms.gsm.serialport - Serial port where the GSM phone is located. Ex: "COM1" sms.gsm.bitrate - Bits per second sms.gsm.bit - Databits sms.gsm.parity - Parity (NONE, EVEN, ODD, MARK, SPACE) sms.gsm.stopbits - Stopbits (1, 1.5, 2) sms.gsm.echo - Is the device echoing the input? sms.gsm.flowcontrol - FlowControl (XONXOFF, RTSCTS, NONE)
This transport cannot set the sending "address" to anything else than the sending phone's phonenumber.
Constructor Summary | |
GsmTransport()
Creates a GsmTransport. |
Method Summary | |
void |
connect()
Initializes the communication with the GSM phone. |
void |
disconnect()
Closes the serial connection to the phone. |
void |
init(java.util.Properties props)
Initializes this transport. |
void |
ping()
Sends a "AT" command to keep the connection alive. |
java.lang.String |
send(SmsMessage msg,
SmsAddress dest,
SmsAddress sender)
Sends the SMS message to the given recipients. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GsmTransport()
Method Detail |
public void init(java.util.Properties props)
init
in interface SmsTransport
props
- public void connect() throws SmsException, java.io.IOException
connect
in interface SmsTransport
SmsException
java.io.IOException
public java.lang.String send(SmsMessage msg, SmsAddress dest, SmsAddress sender) throws SmsException, java.io.IOException
send
in interface SmsTransport
msg
- The message to senddest
- The recieversender
- The sending address, ignored
SmsException
- Thrown if we fail to send the SMS
java.io.IOException
public void ping() throws java.io.IOException
ping
in interface SmsTransport
java.io.IOException
public void disconnect()
disconnect
in interface SmsTransport
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |