|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecthp.opencall.media.sms.tl.PDU
hp.opencall.media.sms.tl2.PDU
A protocol 2 PDU is a SMS TL (Short Message Service Transport Layer) byte array message sent or received thanks to a play or record operation on a relevant SMS Resource.
Each PDU is composed of one or severals Parameter
try{
SMSDeliveryPDU pdu = new SMSDeliveryPDU();
pdu.setMediaIdentifierValue(Parameter.SMS_MEDIA_ID);
pdu.setFirmwareVersionValue(FirmwareVersionAssignedByteArray);
pdu.setSmsProviderIdentifierValue(SmsProviderIdentifierAssignedByteArray);
pdu.setDisplayInformationValue(DisplayInformationAssignedByteArray);
pdu.setDateAndTimeValue(DateAndTimeAssignedByteArray);
pdu.setCallingLineIdentityValue(CallingLineIdentityAssignedByteArray);
pdu.setCallingTerminalIdentityValue(CallingTerminalIdentityByteValue);
pdu.setPublicKeyValue(PublicKeyAssignedByteArray);
pdu.setReplaceShortMessageTypeValue(ReplaceShortMessageTypeByteValue);
// Encoding
encodedPdu = pdu.encodedPDU();
// dump (only during debug in order to avoid to alter performance)
System.out.println("sentPdu "+pdu);
SMSDeliveryPDU receivedPdu = new SMSDeliveryPDU();
receivedPdu.decodePDU(encodedPdu);
// dump (only during debug in order to avoid to alter performance)
System.out.println("receivedPdu "+receivedPdu);
byte _replaceShortMessageValue = receivedPdu.getReplaceShortMessageTypeValue();
byte[] _firmwareVersionValue = receivedPdu.getFirmwareVersionValue();
...
} catch(Exception e){
// exception processing etc.
e.printStackTrace();
}
| Constructor Summary | |
PDU(String aName,
int aParameterNumber)
|
|
| Method Summary | |
void |
decodePDU(byte[] encodedPDU)
Decode a PDU and assigns all the involving Parameters This method should be used when receiving a SMS TL PDU and the Oclet need to get the Parameters values. |
byte[] |
encodedPDU()
Encode a PDU thanks to the previous Parameters assignment. |
| Methods inherited from class hp.opencall.media.sms.tl.PDU |
getSizeInByte, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PDU(String aName,
int aParameterNumber)
| Method Detail |
public byte[] encodedPDU()
throws PDUException
This method should be used to build a SMS TL PDU to be sent thanks to a play operation.
This method throws a PDUException if the encoding can be proceded completly.
encodedPDU in class PDUPDUException - if requested operation failsPlayer.play(java.lang.String[], int, hp.telephony.media.RTC[], java.util.Dictionary)
public void decodePDU(byte[] encodedPDU)
throws PDUException
This method should be used when receiving a SMS TL PDU and the Oclet need to get the Parameters values.
This method throws an DecodingException if the decoding can be proceded completly.
decodePDU in class PDUencodedPDU - is the encoded byte array PDU to decode.
PDUException - if requested operation failsRecorder.record(java.lang.String, hp.telephony.media.RTC[], java.util.Dictionary)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||