org.jsmpp.bean
Class OptionalParameter

java.lang.Object
  extended by org.jsmpp.bean.OptionalParameter
Direct Known Subclasses:
OptionalParameter.Byte, OptionalParameter.Int, OptionalParameter.Null, OptionalParameter.OctetString, OptionalParameter.Short

public abstract class OptionalParameter
extends java.lang.Object

Please see SMPP specifications v3.4 or v5.0 for a detailed explanation of Optional Parameters. This abstract class has subclasses for each available Optional Parameter.

Author:
mikko.koponen, uudashr

Nested Class Summary
static class OptionalParameter.Additional_status_info_text
          The additional_status_info_text parameter gives an ASCII textual description of the meaning of a response PDU.
static class OptionalParameter.Addr_subunit
          Represents valid values for the optional parameters dest_addr_subunit and source_addr_subunit.
static class OptionalParameter.Alert_on_message_delivery
          The alert_on_message_delivery parameter is set to instruct a MS to alert the user (in a MS implementation specific manner) when the short message arrives at the MS.
static class OptionalParameter.Bearer_type
          Represents valid values for the optional parameters dest_bearer_type and source_bearer_type.
static class OptionalParameter.Billing_identification
          Billing information passed from ESME to MC

Bits 7......0
0XXXXXXX (Reserved)
1XXXXXXX (Vendor Specific)
The first octet represents the Billing Format tag and indicates the format of the billing information in the remaining octets.
static class OptionalParameter.Byte
          An optional parameter containing one byte representing a byte integer.
static class OptionalParameter.Callback_num
          The callback_num parameter associates a call back number with the message.
static class OptionalParameter.Callback_num_atag
          From SMPP specs:
Associates a displayable alphanumeric tag with the callback number.
static class OptionalParameter.Callback_num_pres_ind
          This parameter controls the presentation indication and screening of the CallBackNumber at the mobile station.
static class OptionalParameter.COctetString
          An optional parameter containing a series of ASCII characters terminated with the NULL character.
static class OptionalParameter.Delivery_failure_reason
          The delivery_failure_reason parameter is used in the data_sm_resp operation to indicate the outcome of the message delivery attempt (only applicable for transaction message mode).
static class OptionalParameter.Dest_addr_subunit
          The dest_addr_subunit parameter is used to route messages when received by a mobile station, for example to a smart card in the mobile station or to an external device connected to the mobile station.
static class OptionalParameter.Dest_bearer_type
          The dest_bearer_type parameter is used to request the desired bearer for delivery of the message to the destination address.
static class OptionalParameter.Dest_network_type
          The dest_network_type parameter is used to indicate a network type associated with the destination address of a message.
static class OptionalParameter.Dest_subaddress
          The dest_subaddress parameter specifies a subaddress associated with the destination of the message.
static class OptionalParameter.Dest_telematics_id
          This parameter defines the telematic interworking to be used by the delivering system for the destination address.
static class OptionalParameter.Destination_port
          The destination_port parameter is used to indicate the application port number associated with the destination address of the message.
static class OptionalParameter.Display_time
          The display_time parameter is used to associate a display time of the short message on the MS.
static class OptionalParameter.Dpf_result
          The dpf_result parameter is used in the data_sm_resp PDU to indicate if delivery pending flag (DPF) was set for a delivery failure of the short message.
static class OptionalParameter.Int
          An optional parameter containing four bytes representing an int integer.
static class OptionalParameter.Its_reply_type
          The its_reply_type parameter is a required parameter for the CDMA Interactive Teleservice as defined by the Korean PCS carriers [KORITS].
static class OptionalParameter.Its_session_info
          The its_session_info parameter is a required parameter for the CDMA Interactive Teleservice as defined by the Korean PCS carriers [KORITS].
static class OptionalParameter.Language_indicator
          The language_indicator parameter is used to indicate the language of the short message.
static class OptionalParameter.Message_payload
          The message_payload parameter contains the user data.
static class OptionalParameter.Message_state
          The message_state optional parameter is used by the SMSC in the deliver_sm and data_sm PDUs to indicate to the ESME the final message state for an SMSC Delivery Receipt.
static class OptionalParameter.More_messages_to_send
          The more_messages_to_send parameter is used by the ESME in the submit_sm and data_sm operations to indicate to the SMSC that there are further messages for the same destination SME.
static class OptionalParameter.Ms_availability_status
          The ms_availability_status parameter is used in the alert_notification operation to indicate the availability state of the MS to the ESME.
static class OptionalParameter.Ms_msg_wait_facilities
          The ms_msg_wait_facilities parameter allows an indication to be provided to an MS that there are messages waiting for the subscriber on systems on the PLMN.
static class OptionalParameter.Ms_validity
          The ms_validity parameter is used to provide an MS with validity information associated with the received short message.
static class OptionalParameter.Network_error_code
          The network_error_code parameter is used to indicate the actual network error code for a delivery failure.
static class OptionalParameter.Network_type
          Represents valid values for the optional parameters dest_network_type and source_network_type.
static class OptionalParameter.Null
          An optional parameter with an empty value field.
static class OptionalParameter.Number_of_messages
          The number_of_messages parameter is used to indicate the number of messages stored in a mailbox.
static class OptionalParameter.OctetString
          An optional parameter containing a series of octets, not necessarily NULL terminated.
static class OptionalParameter.Payload_type
          The payload_type parameter defines the higher layer PDU type contained in the message payload.
static class OptionalParameter.Privacy_indicator
          The privacy_indicator indicates the privacy level of the message.
static class OptionalParameter.Qos_time_to_live
          This parameter defines the number of seconds which the sender requests the SMSC to keep the message if undelivered before it is deemed expired and not worth delivering.
static class OptionalParameter.Receipted_message_id
          The receipted_message_id parameter indicates the ID of the message being receipted in an SMSC Delivery Receipt.
static class OptionalParameter.Sar_msg_ref_num
          The sar_msg_ref_num parameter is used to indicate the reference number for a particular concatenated short message.
static class OptionalParameter.Sar_segment_seqnum
          The sar_segment_seqnum parameter is used to indicate the sequence number of a particular short message within the concatenated short message.
static class OptionalParameter.Sar_total_segments
          The sar_total_segments parameter is used to indicate the total number of short messages within the concatenated short message.
static class OptionalParameter.Sc_interface_version
          The sc_interface_version parameter is used to indicate the SMPP version supported by the SMSC.
static class OptionalParameter.Set_dpf
          An ESME may use the set_dpf parameter to request the setting of a delivery pending flag (DPF) for certain delivery failure scenarios, such as
- MS is unavailable for message delivery (as indicated by the HLR)
The SMSC should respond to such a request with an alert_notification PDU when it detects that the destination MS has become available.
static class OptionalParameter.Short
          An optional parameter containing two bytes representing a short integer.
static class OptionalParameter.Sms_signal
          The sms_signal parameter is used to provide a TDMA MS with alert tone information associated with the received short message.
static class OptionalParameter.Source_addr_subunit
          The source_addr_subunit parameter is used to indicate where a message originated in the mobile station, for example a smart card in the mobile station or an external device connected to the mobile station.
static class OptionalParameter.Source_bearer_type
          The source_bearer_type parameter indicates the wireless bearer over which the message originated.
static class OptionalParameter.Source_network_type
          The source_network_type parameter is used to indicate the network type associated with the device that originated the message.
static class OptionalParameter.Source_port
          The source_port parameter is used to indicate the application port number associated with the source address of the message.
static class OptionalParameter.Source_subaddress
          The source_subaddress parameter specifies a subaddress associated with the originator of the message.
static class OptionalParameter.Source_telematics_id
          The source_telematics_id parameter indicates the type of telematics interface over which the message originated.
static class OptionalParameter.Tag
          Is all the defined SMPP Optional Parameters.
static class OptionalParameter.User_message_reference
          A reference assigned by the originating SME to the short message.
static class OptionalParameter.User_response_code
          A response code set by the user in a User Acknowledgement/Reply message.
static class OptionalParameter.Ussd_service_op
          The ussd_service_op parameter is required to define the USSD service operation when SMPP is being used as an interface to a (GSM) USSD system.
static class OptionalParameter.Vendor_specific_dest_msc_addr
          The vendor_specific_dest_msc_addr parameter is used to indicate the destination MSC address over which the message terminated.
private static class OptionalParameter.Vendor_specific_msc_addr
           
static class OptionalParameter.Vendor_specific_source_msc_addr
          The vendor_specific_source_msc_addr parameter is used to indicate the source MSC address over which the message originated.
 
Field Summary
 short tag
           
 
Constructor Summary
OptionalParameter(short tag)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 byte[] serialize()
          Convert the optional parameter into a byte serialized form conforming to the SMPP specification.
protected abstract  byte[] serializeValue()
          This method should serialize the value part of the optional parameter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

public final short tag
Constructor Detail

OptionalParameter

public OptionalParameter(short tag)
Method Detail

serialize

public byte[] serialize()
Convert the optional parameter into a byte serialized form conforming to the SMPP specification.

Returns:
A byte array according to SMPP specification

serializeValue

protected abstract byte[] serializeValue()
This method should serialize the value part of the optional parameter. The format of the value is dependant on the specific optional parameter type so it is abstract and must be implmented by subclasses.

Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object