|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
com.objectxp.msg.MessageEvent
A Message Event. Each event has a certain event type and eventually (depending on the type of event) a Message associated. to it.
In order to receive MessageEvents, you have to register yourself as
MessageEventListener with the SmsService.
If the MessageEvent is of type
STATUS_REPORT, the Message attached to this event (see getMessage())
can safely be cast to a StatusReportMessage in
order to get additional status information.
MessageEventListener,
StatusReportMessage,
Serialized Form| Field Summary | |
static int |
DEVICE_NOT_READY
Event type: connection to the device has been closed (disconnected) |
static int |
DEVICE_NOT_RESPONDING
Event Type: Device not responding. |
static int |
DEVICE_READY
Event type: device is ready to use (connected) |
static int |
INCOMING_CALL
Event Type: Incoming call. |
static int |
MESSAGE_NOT_SENT
Event Type: Message Not Sent |
static int |
MESSAGE_RECEIVED
Event Type: Message Received |
static int |
MESSAGE_SENT
Event Type: Message Sent |
static int |
MULTIPART_FAILURE
Event Type: not all parts of a MultipartMessage received within a certain time |
static int |
NETWORK_DISCONNECTED
Event Type: Network registration not ready. |
static int |
RECEIVING_STARTED
Event Type: Receiving started |
static int |
RECEIVING_STOPPED
Event Type: Receiving stopped |
static int |
STATUS_RECEIVED
Event type: status report received |
| Constructor Summary | |
MessageEvent(int type,
Message msg,
java.lang.Object source)
Constructs a MessageEvent with the specified event type and message. |
|
MessageEvent(int type,
Message msg,
java.lang.Object source,
java.lang.Exception exception)
Constructs a MessageEvent with the specified event type and message. |
|
| Method Summary | |
java.lang.Object |
clone()
Create a "deep" copy of this MessageEvent. |
java.lang.Exception |
getException()
Return the Exception that triggered this event. |
Message |
getMessage()
Get the message associated to this event. |
int |
getType()
Returns the type of event (e.g. |
void |
throwException()
Throw exception eventually associated with this event. |
java.lang.String |
toString()
Returns a "human" readable description of the message event type. |
| Methods inherited from class java.util.EventObject |
getSource |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MESSAGE_RECEIVED
public static final int MESSAGE_SENT
public static final int DEVICE_READY
public static final int DEVICE_NOT_READY
public static final int STATUS_RECEIVED
public static final int MESSAGE_NOT_SENT
public static final int RECEIVING_STARTED
public static final int RECEIVING_STOPPED
public static final int NETWORK_DISCONNECTED
GsmSmsService
public static final int DEVICE_NOT_RESPONDING
keep-alive feature is enabled and keep-alive
detects that the communication with the SMSC/GSM device is
broken.
public static final int INCOMING_CALL
GsmSmsService when the modem indicates
a "RING".
public static final int MULTIPART_FAILURE
| Constructor Detail |
public MessageEvent(int type,
Message msg,
java.lang.Object source)
type - of this eventmsg - the messagesource - the object on wich the event occurred
public MessageEvent(int type,
Message msg,
java.lang.Object source,
java.lang.Exception exception)
type - of this eventmsg - the messagesource - the object on wich the event occurredexception - the exception that caused this MessageEvent| Method Detail |
public int getType()
DEVICE_READY).
public Message getMessage()
StatusReportMessage.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedExceptionpublic java.lang.String toString()
public java.lang.Exception getException()
public void throwException()
throws java.lang.Exception
Exception ex = getException(); if( ex != null ) throw ex;
java.lang.Exception
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||