com.objectxp.msg
Interface ManualAck

All Known Implementing Classes:
Cimd2SmsService, SmppSmsService, UcpSmsService

public interface ManualAck

This interface defines the methods necessary to manually acknowledge (ACK) incoming messages. SmsService implementations supporting manual ACK implement this interface.


Method Summary
 void acknowledge(Message msg)
          Accept a incoming message.
 void acknowledge(Message msg, java.lang.Object status)
          Accept/Reject a incoming message.
 void disableManualAck()
          Disable manual acknowledgement.
 void enableManualAck()
          Enable manual acknowledgement.
 boolean isManualAckEnabled()
          Check if manual acknowledgement is enabled/disabled.
 

Method Detail

acknowledge

void acknowledge(Message msg)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalStateException,
                        java.io.IOException
Accept a incoming message. The SmsService acknowledges the reception of the message to the Short Message Center (SMSC).

Parameters:
msg - the Message to accept
Throws:
java.lang.IllegalArgumentException - if the Message is null or not a incoming message, or if the message has been received by another SmsService.
java.lang.IllegalStateException - if the Service is not initialized or not connected to the SMSC.
IOException - if the communication with the SMSC fails.

acknowledge

void acknowledge(Message msg,
                 java.lang.Object status)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalStateException,
                        java.io.IOException
Accept/Reject a incoming message. The SmsService acknowledges the reception of the message to the Short Message Center (SMSC). The status argument to this method may be used to pass protocol specific acknowledge information to the SMSC. Please consult the documentation of the SmsService implementation in use for the meaning of the status object.

Parameters:
msg - the Message to accept
status - the acknowledgement status
Throws:
java.lang.IllegalArgumentException - if the Message is null or not a incoming message, or if the message has been received by another SmsService.
java.lang.IllegalArgumentException - if the status parameter is not applicable for the SmsService implementation in use
java.lang.IllegalStateException - if the Service is not initialized or not connected to the SMSC.
IOException - if the communication with the SMSC fails.
Since:
jSMS 1.8.4

enableManualAck

void enableManualAck()
Enable manual acknowledgement. Incoming messages have to be acknowledged by calling acknowledge(Message).


disableManualAck

void disableManualAck()
Disable manual acknowledgement. Incoming messages will automatically be acknowledged by the SmsService upon reception of the message.


isManualAckEnabled

boolean isManualAckEnabled()
Check if manual acknowledgement is enabled/disabled.



object XP, Inc. © 2000-2008. All rights reserved object XP