ie.ncl.wap.push
Class WSPRequest
java.lang.Object
ie.ncl.wap.push.WSPRequest
- Direct Known Subclasses:
- Bookmark, CacheOperation, DigitalRightsManagement, NokiaSyncml, OTASettings, ServiceIndicator, ServiceLoading, SyncML, WAPProvisioning
public abstract class WSPRequest
- extends java.lang.Object
Method Summary |
byte[] |
encode(byte transactionId,
boolean confirmed)
|
BinaryMessage[] |
encodeToSms(byte transactionId,
Address destination,
boolean confirmed,
boolean registered)
|
BinaryMessage[] |
encodeToSms(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen)
|
BinaryMessage[] |
encodeToSms(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen,
boolean cdmaNetwork)
Uses toSmartMessage(byte, ie.ncl.msg.Address, boolean, boolean) and then fragments
to BinaryMessage using NarrowBandSocket.fragmentMessage(ie.ncl.sms.nbs.SmartMessage, int) . |
BinaryMessage[] |
encodeToSms(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen,
boolean cdmaNetwork,
boolean portNumberInEachFragment)
|
static java.lang.String |
entityEncode(java.lang.String source)
|
static ie.ncl.util.bin.Bytes |
generateMac(java.lang.String key,
byte[] wbxml)
|
Attributes |
getAttributes()
|
java.lang.String |
getContentType()
|
java.lang.String |
getEncoding()
|
java.lang.String |
getHeader(java.lang.String headerName)
|
java.util.Set |
getHeaderNames()
|
java.lang.String |
getNetworkPin()
|
int |
getTransactionID()
Get the transaction ID fo the WSP Request. |
java.lang.String |
getUserPin()
|
abstract java.lang.String |
getXml()
|
static void |
main(java.lang.String[] args)
|
void |
setAttributes(Attributes attributes)
|
void |
setEncoding(java.lang.String encoding)
|
void |
setHeader(java.lang.String headerName,
java.lang.String value)
|
void |
setNetworkPin(java.lang.String networkPin)
|
void |
setTransactionID(int tid)
Set the transaction ID of the WSP Request. |
void |
setUserPin(java.lang.String userPin)
|
SmartMessage |
toSmartMessage(byte transactionId,
Address destination,
boolean confirmed,
boolean registered)
Encode this WSPRequest as a SmartMessage, which can then be sent using a
NarrowBandSocket object. |
SmartMessage |
toSmartMessage(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen)
|
SmartMessage |
toSmartMessage(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen,
boolean cdmaNetwork)
|
SmartMessage |
toSmartMessage(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen,
boolean cdmaNetwork,
boolean portNumberInEachFragment)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SECURITY_METHOD_NETWPIN
public static final int SECURITY_METHOD_NETWPIN
- See Also:
- Constant Field Values
SECURITY_METHOD_USERPIN
public static final int SECURITY_METHOD_USERPIN
- See Also:
- Constant Field Values
SECURITY_METHOD_USERNETWPIN
public static final int SECURITY_METHOD_USERNETWPIN
- See Also:
- Constant Field Values
SECURITY_METHOD_USERPINMAC
public static final int SECURITY_METHOD_USERPINMAC
- See Also:
- Constant Field Values
WSPRequest
public WSPRequest()
getXml
public abstract java.lang.String getXml()
getAttributes
public Attributes getAttributes()
setAttributes
public void setAttributes(Attributes attributes)
setTransactionID
public void setTransactionID(int tid)
- Set the transaction ID of the WSP Request.
A transaction ID should be in the range between 0 to 255.
getTransactionID
public int getTransactionID()
- Get the transaction ID fo the WSP Request.
getHeader
public java.lang.String getHeader(java.lang.String headerName)
getHeaderNames
public java.util.Set getHeaderNames()
getEncoding
public java.lang.String getEncoding()
setEncoding
public void setEncoding(java.lang.String encoding)
getContentType
public java.lang.String getContentType()
setHeader
public void setHeader(java.lang.String headerName,
java.lang.String value)
getUserPin
public java.lang.String getUserPin()
setUserPin
public void setUserPin(java.lang.String userPin)
getNetworkPin
public java.lang.String getNetworkPin()
setNetworkPin
public void setNetworkPin(java.lang.String networkPin)
entityEncode
public static java.lang.String entityEncode(java.lang.String source)
encode
public byte[] encode(byte transactionId,
boolean confirmed)
throws ie.ncl.wap.wsp.InvalidEncodingException,
ie.ncl.wap.wsp.UnImplementedException
- Throws:
ie.ncl.wap.wsp.InvalidEncodingException
ie.ncl.wap.wsp.UnImplementedException
toSmartMessage
public SmartMessage toSmartMessage(byte transactionId,
Address destination,
boolean confirmed,
boolean registered)
throws ie.ncl.wap.wsp.UnImplementedException,
ie.ncl.wap.wsp.InvalidEncodingException
- Encode this WSPRequest as a SmartMessage, which can then be sent using a
NarrowBandSocket
object.
- Throws:
ie.ncl.wap.wsp.UnImplementedException
ie.ncl.wap.wsp.InvalidEncodingException
toSmartMessage
public SmartMessage toSmartMessage(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen)
throws ie.ncl.wap.wsp.UnImplementedException,
ie.ncl.wap.wsp.InvalidEncodingException
- Throws:
ie.ncl.wap.wsp.UnImplementedException
ie.ncl.wap.wsp.InvalidEncodingException
toSmartMessage
public SmartMessage toSmartMessage(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen,
boolean cdmaNetwork)
throws ie.ncl.wap.wsp.UnImplementedException,
ie.ncl.wap.wsp.InvalidEncodingException
- Throws:
ie.ncl.wap.wsp.UnImplementedException
ie.ncl.wap.wsp.InvalidEncodingException
toSmartMessage
public SmartMessage toSmartMessage(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen,
boolean cdmaNetwork,
boolean portNumberInEachFragment)
throws ie.ncl.wap.wsp.UnImplementedException,
ie.ncl.wap.wsp.InvalidEncodingException
- Throws:
ie.ncl.wap.wsp.UnImplementedException
ie.ncl.wap.wsp.InvalidEncodingException
encodeToSms
public BinaryMessage[] encodeToSms(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen,
boolean cdmaNetwork)
throws ie.ncl.wap.wsp.UnImplementedException,
ie.ncl.wap.wsp.InvalidEncodingException,
ie.ncl.net.pdu.EncoderException,
MessageException,
java.io.IOException
- Uses
toSmartMessage(byte, ie.ncl.msg.Address, boolean, boolean)
and then fragments
to BinaryMessage
using NarrowBandSocket.fragmentMessage(ie.ncl.sms.nbs.SmartMessage, int)
.
- Throws:
ie.ncl.wap.wsp.UnImplementedException
ie.ncl.wap.wsp.InvalidEncodingException
ie.ncl.net.pdu.EncoderException
MessageException
java.io.IOException
encodeToSms
public BinaryMessage[] encodeToSms(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen,
boolean cdmaNetwork,
boolean portNumberInEachFragment)
throws ie.ncl.wap.wsp.UnImplementedException,
ie.ncl.wap.wsp.InvalidEncodingException,
ie.ncl.net.pdu.EncoderException,
MessageException,
java.io.IOException
- Throws:
ie.ncl.wap.wsp.UnImplementedException
ie.ncl.wap.wsp.InvalidEncodingException
ie.ncl.net.pdu.EncoderException
MessageException
java.io.IOException
encodeToSms
public BinaryMessage[] encodeToSms(byte transactionId,
Address destination,
boolean confirmed,
boolean registered,
int maxFragLen)
throws ie.ncl.wap.wsp.UnImplementedException,
ie.ncl.wap.wsp.InvalidEncodingException,
ie.ncl.net.pdu.EncoderException,
MessageException,
java.io.IOException
- Throws:
ie.ncl.wap.wsp.UnImplementedException
ie.ncl.wap.wsp.InvalidEncodingException
ie.ncl.net.pdu.EncoderException
MessageException
java.io.IOException
encodeToSms
public BinaryMessage[] encodeToSms(byte transactionId,
Address destination,
boolean confirmed,
boolean registered)
throws ie.ncl.wap.wsp.UnImplementedException,
ie.ncl.wap.wsp.InvalidEncodingException,
ie.ncl.net.pdu.EncoderException,
MessageException,
java.io.IOException
- Throws:
ie.ncl.wap.wsp.UnImplementedException
ie.ncl.wap.wsp.InvalidEncodingException
ie.ncl.net.pdu.EncoderException
MessageException
java.io.IOException
generateMac
public static ie.ncl.util.bin.Bytes generateMac(java.lang.String key,
byte[] wbxml)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
- Throws:
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
main
public static void main(java.lang.String[] args)
throws java.io.IOException,
ie.ncl.wap.wsp.UnImplementedException,
ie.ncl.wap.wsp.InvalidEncodingException,
ie.ncl.net.pdu.EncoderException
- Throws:
java.io.IOException
ie.ncl.wap.wsp.UnImplementedException
ie.ncl.wap.wsp.InvalidEncodingException
ie.ncl.net.pdu.EncoderException