Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Entries

photo

Lotus Notes server h...

Blog:  Steve's Lotus...
Steve Medure
Updated 
Ratings 1     Comments 1
photo

The new Blackberry S...

Blog:  Life is too s...
Barbara Skedel
Updated 
No Ratings 0     No Comments 0
photo

Debugging Notes and ...

Blog:  Yellow is the...
Tim Tripcony
Updated 
No Ratings 0     No Comments 0
photo

Painless upgrade to ...

Blog:  Write it on a...
David Jones
Updated 
No Ratings 0     Comments 1
photo

Cannot edit the loca...

Blog:  Life is too s...
Barbara Skedel
Updated 
No Ratings 0     No Comments 0

Dogear Bookmarks

.Domino Framework

Blog Authors:  Peter Presnell  

Previous |  Main  | Next

DominoBES class

Peter Presnell  |     |  Tags:  java bes blackberry .dominoframework  |  Comments (0)
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 - browserChannelPush (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);
    }
  }
}

Comments

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.