net.rim.device.api.io.http
Class MDSPushInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.DataInputStream
          extended by net.rim.device.api.io.http.PushInputStream
              extended by net.rim.device.api.io.http.MDSPushInputStream
All Implemented Interfaces:
DataInput

public final class MDSPushInputStream
extends PushInputStream

A push input stream specifically for use with the BlackBerry MDS Connection service. An application may use an instance of this class to send an acknowledgement back to the BlackBerry MDS Connection service that indicates the application has accepted a push request.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

Field Summary
 
Fields inherited from class net.rim.device.api.io.http.PushInputStream
CONNECTION_IPPP_UID, CONNECTION_IPV4, CONNECTION_SMSC, DECLINE_REASON_USERDCR, DECLINE_REASON_USERDCU, DECLINE_REASON_USERPND, DECLINE_REASON_USERREQ, DECLINE_REASON_USERRFS
 
Fields inherited from class java.io.DataInputStream
in
 
Constructor Summary
Category: Signed MDSPushInputStream(HttpServerConnection connection, InputStream in)
          Creates a new MDSPushInputStream instance from a connection.
 
Method Summary
Category: Signed  void accept()
          Accepts this push.
Category: Signed  void decline(int reasonCode)
          Declines this push because of the reason provided.
Category: Signed  int getConnectionType()
          Retrieves the connection type for this push.
Category: Signed  String getSource()
          Retrieves the source for this push stream.
Category: Signed  boolean isChannelEncrypted()
          Determines if this channel is encrypted.
 
Methods inherited from class net.rim.device.api.io.http.PushInputStream
getSender
 
Methods inherited from class java.io.DataInputStream
available, close, mark, markSupported, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLong, readShort, readUTF, readUTF, readUnsignedByte, readUnsignedShort, reset, skip, skipBytes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

MDSPushInputStream

public MDSPushInputStream(HttpServerConnection connection,
                          InputStream in)
Creates a new MDSPushInputStream instance from a connection.

Parameters:
connection - HttpServerConnection received from the invocation of HttpServerSocketConnection.acceptAndOpen().
in - Input stream associated with the server connection.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0


Method Detail

getSource

public String getSource()
Retrieves the source for this push stream.

Specified by:
getSource in class PushInputStream
Returns:
String form of the source of this push; it could be a UID for a connection, IPv4 address, or SMSC.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getConnectionType

public int getConnectionType()
Retrieves the connection type for this push.

Specified by:
getConnectionType in class PushInputStream
Returns:
PushInputStream.CONNECTION_IPPP_UID.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

isChannelEncrypted

public boolean isChannelEncrypted()
Determines if this channel is encrypted.

Specified by:
isChannelEncrypted in class PushInputStream
Returns:
True if this channel is encrypted; otherwise, false.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

decline

public void decline(int reasonCode)
             throws IOException
Declines this push because of the reason provided.

Specified by:
decline in class PushInputStream
Parameters:
reasonCode - Code for the reason why the push was declined.
Throws:
IOException
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

accept

public void accept()
            throws IOException
Accepts this push.

Indicates the push acceptance to the server if the bearer supports acknowledgement.

Specified by:
accept in class PushInputStream
Throws:
IOException
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal