DominoBES class
I am now in the process of extending the .Domino Framerwork to support the publishing of Notes applications on a Blackberry client. A new DominoBES class has been added as a way of allowing Notes applications to communicate with a Blackberry device via the Blackberry Enterprise Server (BES). Unlike the rest of the framework, this class has been developed in Java due to the need to send an HTTP POST request. The first method - brow serChannelPush (see below) provides a wrapper for executing a Channel Push, effectively adding an icon to the Blackberry device, which when selected invokes the nominated URL. import java.net.*; public class DominoBES { public void DominoBES() { } public void browserChannelPush(String mdsHost, int mdsPort,String email,String docURL, String unreadIconURL, String readIconURL, String pushID, String pushTitle) { try { URL mdsURL = new URL("http",mdsHost,mdsPort,"push?DESTINATION=" + email + "&PORT=7874&REQUESTURI=/"); HttpURLConnection connection = (HttpURLConnection)mdsURL.openConnection(); connection.setRequestMethod("Post"); connection.setRequestProperty("X-RIM-Push-Type","Browser-Channel"); connection.setRequestProperty("X-RIM-Push-Title",pushTitle); connection.setRequestProperty("X-RIM-Push-Channel-ID",pushID); connection.setRequestProperty("X-Rim-Push-Read-Icon-URL",readIconURL); connection.setRequestProperty("X-Rim-Push-Unread-Icon-URL",unreadIconURL); connection.setRequestProperty("Content-Location",docURL); } catch (Exception e) { System.err.println("Push failure"); e.printStackTrace(System.err); } } }
import java.net.*; public class DominoBES { public void DominoBES() { } public void browserChannelPush(String mdsHost, int mdsPort,String email,String docURL, String unreadIconURL, String readIconURL, String pushID, String pushTitle) { try { URL mdsURL = new URL("http",mdsHost,mdsPort,"push?DESTINATION=" + email + "&PORT=7874&REQUESTURI=/"); HttpURLConnection connection = (HttpURLConnection)mdsURL.openConnection(); connection.setRequestMethod("Post"); connection.setRequestProperty("X-RIM-Push-Type","Browser-Channel"); connection.setRequestProperty("X-RIM-Push-Title",pushTitle); connection.setRequestProperty("X-RIM-Push-Channel-ID",pushID); connection.setRequestProperty("X-Rim-Push-Read-Icon-URL",readIconURL); connection.setRequestProperty("X-Rim-Push-Unread-Icon-URL",unreadIconURL); connection.setRequestProperty("Content-Location",docURL); } catch (Exception e) { System.err.println("Push failure"); e.printStackTrace(System.err); } } }
|
DominoBES class
|