|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--zyneo.sms.Sms
Represents an Sms message. All GSM-numbers must be in valid international format, for example +46702051108.
Field Summary | |
protected java.lang.String |
m_from
GSM-number which this message orginated from (might be null if MT orginated message). |
protected java.lang.String |
m_message
The actual message. |
protected boolean |
m_notify
True if notifications are wanted |
protected java.util.Date |
m_time
Message time, the time the message was sent/received |
protected java.lang.String |
m_to
GSM-number do send this message to (might be null if MT designated message.) |
protected java.util.Date |
m_valid_until
Valid time, the validity time for this message, if null then provider/SMSC specific default value will be used. |
Constructor Summary | |
Sms()
Default constructor. |
|
Sms(java.lang.String to,
java.lang.String message)
Constructor for MT designated messages. |
|
Sms(java.lang.String from,
java.lang.String message,
java.util.Date time)
Constructor for MT designated messages. |
Method Summary | |
java.util.Date |
getExpire()
Retrives the current validity limit. |
java.lang.String |
getFrom()
Retrives from-number. |
java.lang.String |
getMessage()
Retrives the message-text |
boolean |
getNotify()
Retrives the "notification requested" flag. |
java.util.Date |
getTime()
Retrives the time when message was arrived if MT designated message, otherwise null. |
java.lang.String |
getTo()
Retrives current to number. |
void |
setExpire(java.util.Date expire)
Sets the valid-time. |
void |
setFrom(java.lang.String from)
Sets from number. |
void |
setMessage(java.lang.String text)
Sets the message-text. |
void |
setNotify(boolean b)
Sets the "notifications requested" flag. |
void |
setTo(java.lang.String to)
Sets the to number. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String m_to
protected java.lang.String m_from
protected java.lang.String m_message
protected java.util.Date m_valid_until
protected boolean m_notify
protected java.util.Date m_time
Constructor Detail |
public Sms()
public Sms(java.lang.String to, java.lang.String message)
to
- International GSM number to send tomessage
- the text message (max 160 chars)public Sms(java.lang.String from, java.lang.String message, java.util.Date time)
from
- from number.message
- the messagetime
- the time the message was received.Method Detail |
public void setTo(java.lang.String to)
to
- valid international GSM numberpublic java.lang.String getTo()
null
if not set.public void setFrom(java.lang.String from)
from
- from numberpublic java.lang.String getFrom()
null
if not setpublic void setMessage(java.lang.String text)
text
- the message text.public java.lang.String getMessage()
null
if an empty message
or not set.public void setExpire(java.util.Date expire)
null
then the default value for
the provider / SMSC will be used.
expire
- The time this message expires.public java.util.Date getExpire()
null
,
null means "use provider / SMSC default"public void setNotify(boolean b)
b
- if true notifications is requestedzyneo.sms.provider.iNotify
public boolean getNotify()
public java.util.Date getTime()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |