Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit

ie.ncl.sms.gsm
Class LongMessageSender

java.lang.Object
  extended by ie.ncl.sms.gsm.LongMessageSender
All Implemented Interfaces:
java.util.Comparator

public class LongMessageSender
extends java.lang.Object
implements java.util.Comparator

Create a long message transmitter. A long message transmitter partitions a long message into a series of short message fragments and transmits them over the SMS interface. Messages can also be received using a LongMessageReceiver.

See Also:
LongMessageReceiver

Constructor Summary
LongMessageSender(Sender sender, int expiry)
          Create a long message transmitter specifying the underlying SMS interface.
 
Method Summary
 void close()
          Close the connection.
 int compare(java.lang.Object oa, java.lang.Object ob)
          Comparator interface method.
 void connect()
          Open the connection.
 boolean equals(java.lang.Object o)
          Comparator interface method.
 boolean getAlwaysUseHeaders()
          Get the Use Headers field.
 java.lang.String getCharacterEncoding()
           
 boolean getUseUdhi()
          Get the UDHI usage.
 void send(Message m)
           
 void send(Message m, int sequence)
          Send a long message.
 void setAlwaysUseHeaders(boolean value)
          This is used to specify that long message headers are always used, even if the message is one fragment long.
 void setCharacterEncoding(java.lang.String characterEncoding)
           
 void setFragmentationSize(int size)
          Set the fragmentation size (140 by default).
 void setUseUdhi(boolean value)
          Long messages always have the UDHI field turned on when the are fragmented.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongMessageSender

public LongMessageSender(Sender sender,
                         int expiry)
Create a long message transmitter specifying the underlying SMS interface. This object fragments long messages into a number of short messages and sends them individually.

Method Detail

setFragmentationSize

public void setFragmentationSize(int size)
Set the fragmentation size (140 by default).


setAlwaysUseHeaders

public void setAlwaysUseHeaders(boolean value)
This is used to specify that long message headers are always used, even if the message is one fragment long.


getAlwaysUseHeaders

public boolean getAlwaysUseHeaders()
Get the Use Headers field.

See Also:
setAlwaysUseHeaders(boolean)

setUseUdhi

public void setUseUdhi(boolean value)
Long messages always have the UDHI field turned on when the are fragmented. This can be forced off using this method.


getUseUdhi

public boolean getUseUdhi()
Get the UDHI usage.

See Also:
setUseUdhi(boolean)

equals

public boolean equals(java.lang.Object o)
Comparator interface method.

Specified by:
equals in interface java.util.Comparator
Overrides:
equals in class java.lang.Object

compare

public int compare(java.lang.Object oa,
                   java.lang.Object ob)
Comparator interface method.

Specified by:
compare in interface java.util.Comparator

send

public void send(Message m)
          throws ConnectionException,
                 MessageException
Throws:
ConnectionException
MessageException

send

public void send(Message m,
                 int sequence)
          throws MessageException,
                 ConnectionException
Send a long message.

Throws:
MessageException
ConnectionException

close

public void close()
Close the connection.


connect

public void connect()
             throws ConnectionException
Open the connection.

Throws:
ConnectionException

getCharacterEncoding

public java.lang.String getCharacterEncoding()

setCharacterEncoding

public void setCharacterEncoding(java.lang.String characterEncoding)

Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit