com.objectxp.msg
Interface WindowingService

All Superinterfaces:
SmsService
All Known Implementing Classes:
Cimd2SmsService, SmppSmsService, UcpSmsService

public interface WindowingService
extends SmsService

This interface may be implemented by SmsServices that support Windowing. Make sure that your SMSC has enabled windowing before using it.

When windowing is enabled and the maximum window size is not yet reached, the sendMessage() method will immediately return and you will be notified about the success/failure of the method using a MessageEvent.

If windowing is disabled or the "window" is full, sendMessage() will block until the SMSC acknowledges/rejects the message.


Field Summary
 
Fields inherited from interface com.objectxp.msg.SmsService
VERSION
 
Method Summary
 int getNumberOfPendingMessages()
          Returns the number of pending (unprocessed messages).
 int getWindowSize()
          Returns the current window size or 1 if windowing is disabled.
 void setWindowSize(int size)
          Set the window size for this service.
 
Methods inherited from interface com.objectxp.msg.SmsService
addMessageEventListener, cancel, connect, destroy, disconnect, getKeepAliveInterval, getLastIsAliveTime, getProperties, getServiceName, hasCapability, init, init, init, isAlive, isConnected, isInitialized, isKeepAliveActive, isReceiving, query, removeMessageEventListener, replace, sendMessage, setKeepAliveInterval, startReceiving, stopReceiving, supportDeleteMessage, supportReadMessage
 

Method Detail

setWindowSize

void setWindowSize(int size)
                   throws java.lang.IllegalAccessException
Set the window size for this service. To disable windowing, set the window size to 1. The window size can only be changed if the SmsService is not currently connected to the SMSC.

Parameters:
size - the window size
Throws:
java.lang.IllegalAccessException - if the service is connected to the SMSC when calling this method

getWindowSize

int getWindowSize()
Returns the current window size or 1 if windowing is disabled.


getNumberOfPendingMessages

int getNumberOfPendingMessages()
Returns the number of pending (unprocessed messages). You may use this method to check if all outgoing messages have been acknowledged by the SMSC prior to calling disconnect() on the SmsService.



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