Network communication overviewCommunication APICommunicating with HTTP serversRequest data using a BlockingSenderDestination objectRequest data using a NonBlockingSenderDestination objectSend data using a FireAndForgetDestination objectParsing a common Internet data formatSubscribing to a push initiatorSubscribe to a push initiatorSending login information to an HTTP serverNetwork tranportsArchitecture: Network transportsUsing the BlackBerry Enterprise Server as an intranet gatewayUsing a wireless service provider's Internet gatewayNetwork connectionsThe Network APIChoosing network transports using the Network APIOpening a network connection using the Network APIGeneric Connection FrameworkOpen a network connection using the GCFSend and receive data using a network connectionNetwork transport optionsWorking with radiosQuery a radio's availability and change its statusCode samplesCode sample: Requesting data using a BlockingSenderDestination objectCode sample: Requesting data using a NonBlockingSenderDestination objectCode sample: Parsing a JSON data structureCode sample: Retrieving a web page using the Network APICode sample: Retrieving a web page using the GCFCode sample: Determining network transports with sufficient coverage using the Network APICode sample: Controlling radiosCode sample: Determining the status of a network transport using the Network APIGlossaryProvide feedbackDocument revision historyLegal noticeBlackBerry Java SDKNetwork CommunicationVersion: 6.0Development GuidePublished: 2010-11-08SWD-1327377-1111022758-001Contents1 Network communication overview........................................................................................................................................... 32 Communication API.................................................................................................................................................................... 4Communicating with HTTP servers............................................................................................................................................... 5Request data using a BlockingSenderDestination object................................................................................................. 6Request data using a NonBlockingSenderDestination object.......................................................................................... 8Send data using a FireAndForgetDestination object......................................................................................................... 10Parsing a common Internet data format............................................................................................................................. 11Subscribing to a push initiator...................................................................................................................................................... 12Subscribe to a push initiator................................................................................................................................................. 13Sending login information to an HTTP server............................................................................................................................. 143 Network tranports....................................................................................................................................................................... 15Architecture: Network transports................................................................................................................................................. 15Using the BlackBerry Enterprise Server as an intranet gateway.............................................................................................. 18Using a wireless service provider's Internet gateway................................................................................................................ 184 Network connections.................................................................................................................................................................. 20The Network API............................................................................................................................................................................. 22Choosing network transports using the Network API....................................................................................................... 22Opening a network connection using the Network API.................................................................................................... 22Generic Connection Framework.................................................................................................................................................... 24Open a network connection using the GCF........................................................................................................................ 25Send and receive data using a network connection................................................................................................................... 26Network transport options............................................................................................................................................................. 295 Working with radios.................................................................................................................................................................... 32Query a radio's availability and change its status...................................................................................................................... 326 Code samples............................................................................................................................................................................... 34Code sample: Requesting data using a BlockingSenderDestination object............................................................................ 34Code sample: Requesting data using a NonBlockingSenderDestination object.................................................................... 37Code sample: Parsing a JSON data structure............................................................................................................................. 40Code sample: Retrieving a web page using the Network API................................................................................................... 44Code
View Full Document