| Latest 7 Posts |
Staying in Wonderland Thu, Oct 11th 2012 153
|
Dear Yancy Lent Thu, Oct 11th 2012 130
|
Understanding Notes apps Wed, Oct 10th 2012 51
|
Congratulations, Devin! Thu, May 3rd 2012 130
|
Dear everyone in the HVAC industry... Wed, May 2nd 2012 140
|
American Spring Fri, Apr 27th 2012 120
|
Protect yourself, empower your audience Thu, Apr 26th 2012 165
|
| Top
10 |
Sorry, no records were found!
|
|
More secret Java APIs for Domino
Nathan T Freeman
While researching some tooling last week,
I found myself wondering about the Java Server Addins that have been in
Domino since version 6: Changeman and ISpy. These two Java addins do some
very interesting stuff focused on monitoring server availability and resource
load. But what's more interesting is that the packages for them can be
found in notes.jar. And it turns out that those packages offer some surprisingly
useful APIs.
Classes like lotus.notes.addins.JavaServerSession,
lotus.notes.addins.SocketAddin, lotus.notes.internal.MessageQueue are...
intriguing to say the least. But my personal favorite is the lotus.notes.addins.DominoServer
class. Here's some sample code for you...
DominoServer myBlogServer = new
DominoServer("CN=thentf/O=GBSBlogs");
// create DominoServer
for my blog server
String timsName = "CN=Tim
Tripcony/OU=NA/O=GBS";
Collection timsNames = myBlogServer.getNamesList(timsName);
// get Tim's names list
according to my blog server
Collection myNames = myBlogServer.getNamesList(curSession.getUserName());
// get my names list
according to my blog server
Collection directoryPaths = myBlogServer.getInfo(ServerInfo.NABS);
// get list of directories
enabled by my blog server
boolean
timHasUnrestricted = myBlogServer.checkServerAccess(timsName, ServerAccess.PROG_UNRESTRICTED);
// whether Tim is
//
included in
//
unrestricted LS/Java
//
agents list
Collection myServerNetAddresses = myBlogServer.lookupServerRecord("NetAddresses");
// returns the value
of NetAddresses field
//
from server doc for my blog server
Collection timsServerClusterName = myBlogServer.lookupServerRecord("CN=Xmage/O=GBSBlogs",
"ClusterName");
// returns the value
//
of cluster name
//
for Tim's server
//
*according to my
//
blog server*
myBlogServer.refreshDesign("nathan/escape.nsf");
// starts design refresh
of blog database
myBlogServer.sendConsoleCommand("tell
http osgi ss"); //
send console command to my blog server
You might be thinking "but these
are part of the lotus.notes package, and that is deprecated" but it's
only the *namespace* that's in the lotus.notes package. The classes themselves
import the current lotus.domino packages.
Hope you find these useful!
--------------------- http://ntf.gbs.com/nathan/escape.nsf/d6plinks/NTFN-8TMHRP Apr 23, 2012 122 hits
| Recent Blog Posts |
Sorry, no records were found!
|