Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## hr.tis.mgw.client.message.notification
Interface MessageListener2

public interface MessageListener2

Listener interface for received messages. Implementation has to register itself to `MessageManager2` in order to receive messages. To register implementation enabling it to receive message use `MessageManager2.registerMessageListener(String, MessageListener2)` or `MessageManager2.registerMessageListener(String, MessageListener2, String, String)` methods on `MessageManager2` implementation.

Multiple `MessageListener2` instances can be registered with single `MessageManager2Impl`, with different registration ID. This way, client can use separate listener for messages with different short code.

All parameters provided in notification callbacks (`ReceivedSms`, `ReceivedMms`, `DeliveryReport` and `ReceivedLongSmsSegment`) also contain `registrationId` value. This way, single listener can be used to receive all messages and be processed by partner in some arbitrary way.

Note that single listener can be registered multiple times with single or multiple `MessageManager2Impl` instances, but each time with different `registrationId`. Client API will use registration ID value to route the request to appropriate listener. Registering another listener with same registration ID overwrites previous registration and new listener will receive callbacks for this registration ID. Registration ID is not scoped per message manager instance but should be unique in client API (i.e. in general case it's not possible to receive notifications from different operators with same registration ID).

See Also:
  `MessageManager2`

Method Summary
`void` | `deliveryReportReceived(DeliveryReport deliveryReport)` Called when delivery report is received.
`void` | `longSmsReceived(ReceivedLongSmsSegment longSmsSegment)` Called when long SMS segment is received.
`void` | `mmsReceived(ReceivedMms mms)` Called when MMS is received.
`void` | `smsReceived(ReceivedSms sms)` Called when SMS is received.

Method Detail

### smsReceived

    public void smsReceived(ReceivedSms sms)

  Called when SMS is received.

  Parameters:
    `sms` - Received SMS.

### mmsReceived

    public void mmsReceived(ReceivedMms mms)

  Called when MMS is received.

  Parameters:
    `mms` - Received MMS.

### deliveryReportReceived

    public void deliveryReportReceived(DeliveryReport deliveryReport)

  Called when delivery report is received.

  Parameters:
    `deliveryReport` - Delivery report.

### longSmsReceived

    public void longSmsReceived(ReceivedLongSmsSegment longSmsSegment)

  Called when long SMS segment is received. This functionality is extension and might not be available with some operators.

  Parameters:
    `longSmsSegment` - Long SMS segment.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2007, TIS.kis d.o.o. All Rights Reserved.