org.mobicents.protocols.smpp.gsm
Interface UserData

All Known Implementing Classes:
UserDataImpl

public interface UserData

Interface for objects that can represent TP-User-Data as defined by 3GPP TS 23.040.

Experimental API: UserData and its supporting classes and implementations are an experimental API and can change or be removed at any time.

Version:
$Id: UserData.java 484 2010-02-08 16:08:50Z orank $

Method Summary
 void addHeaderElement(HeaderElement element)
          Add a HeaderElement to this user data implementation.
 byte[] getData()
          Get the payload of this user data.
 boolean isMultiMessage()
          Calculate if this user data requires multiple SMS segments.
 void setData(byte[] data)
          Set the payload of this user data.
 byte[][] toSegments()
          Get the user data SMS segments.
 byte[] toSingleSms()
          Get the user data as a single message.
 

Method Detail

addHeaderElement

void addHeaderElement(HeaderElement element)
Add a HeaderElement to this user data implementation.

Parameters:
element - The header element to add.

isMultiMessage

boolean isMultiMessage()
Calculate if this user data requires multiple SMS segments.

Returns:
true if the user data requires multiple SMS segments, false if the data requires only a single SMS.

toSingleSms

byte[] toSingleSms()
Get the user data as a single message. This method only returns normally if isMultiMessage() returns false.

Returns:
A byte array containing the encoded user data.
Throws:
IllegalStateException - If this user data requires more than one SMS segment.

toSegments

byte[][] toSegments()
Get the user data SMS segments.

Returns:
An array of byte arrays, each element contains a single SMS segment.

getData

byte[] getData()
Get the payload of this user data. This is the data that is included in the message after the user data header has been encoded.

Returns:
The payload of this user data.

setData

void setData(byte[] data)
Set the payload of this user data.

Parameters:
data - The payload of this user data.
See Also:
getData()


Copyright © 2011 Mobicents. All Rights Reserved.