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

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.TCPPushInputStream
All Implemented Interfaces:
DataInput

public final class TCPPushInputStream
extends PushInputStream

A push input stream specifically for use with TCP/IP connections.

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.2

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 TCPPushInputStream(HttpServerConnection connection, InputStream in)
          Creates a new TCPPushInputStream 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()
          Returns if the channel is encrypted.
Category: Signed  void setDoWAPResponse(boolean value)
          Sets whether or not to do WAP Push Status response.
 
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

TCPPushInputStream

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

Parameters:
connection - An object representing an HTTP connection that implements the HttpServerConnection interface.
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.2


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.2

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.2

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.2

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.2

isChannelEncrypted

public boolean isChannelEncrypted()
Returns if the channel is encrypted.

Specified by:
isChannelEncrypted in class PushInputStream
Returns:
Returns false, TLS/SSL currently not supported.
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.2

setDoWAPResponse

public void setDoWAPResponse(boolean value)
Sets whether or not to do WAP Push Status response.

Parameters:
value - Whether or not to send the WAP Push Status response.
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.2





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