Class: |
DimBrowser |
Library: |
DIM |
|
Author: |
C. Gaspar |
|
Version: |
v1.0 |
Update :Thu Feb 11 15:52:46
1999 |
Descrition :
To be used by DIM processes - implements DIM environment
browsing.
Allows Getting Information on Services, Servers
and Clients available.
Please refer to Usage
for examples
Public Functions :
-
String[] getServices ( String wildcardServiceName);
// Check if a Service or Services (wildcards allowed) are available.
Returns an empty array if none available
otherwise the list of services matching the argument.
-
String[] getServers ( ); // Get the list of
all servers available in the system. Returns the list of servers available.
Methods for Decoding/Complementing the information of
the above calls
-
String getFormat ( String service); // can be called after a getServices( ) call. It will return the
format of the Service. The service_format is the one given to
DimService,
DimCommand or DimRpc.
-
int isCommand ( String service); // can be called after a getServices(
) call.
- String getServerNode (String server); // can be called after a getServers(
) call. It will return the name of the node where the server runs.
- int getServerPid ( String server); // can be called after a getServers( ) call.
It will return the PID of the server.
Usage :
import dim.*;
String[] srvcs = DimBrowser.getServices("SMI/*");
for(int
i = 0; i <srvcs.length; i++)
{
System.out.println("i:
"+i+" - "+srvcs[i]);
System.out.println(DimBrowser.getFormat(srvcs[i]));
System.out.println(DimBrowser.isCommand(srvcs[i]));
}
String[] servers = DimBrowser.getServers();
for(int
i = 0; i <servers.length; i++)
{
System.out.println("i:
"+i+" - "+servers[i]);
System.out.println(DimBrowser.getServerNode(servers[i]));
System.out.println(DimBrowser.getServerPid(servers[i]));
}
Last update : 02/19/99 12:49:03 by MkHelp
1.1.0