jain.jcp
Interface JcpPeer


public interface JcpPeer

The JcpPeer interface represents a vendor's particular implementation of the JCP API.

Since implementations of just the JCP interface are not expected, other interfaces derived from JCP for example, JTAPI, JCC etc are expected to implement this interface. The JcpPeer object returned by the JcpPeerFactory.getJcpPeer(String) method determines which JcpProviders are made available to the application.

Applications use the getProvider(String) method on this interface to obtain new JcpProvider objects. Each implementation may support one or more different "services". A list of available services can be obtained via the getServices() method.

Obtaining a JcpProvider

Applications use the getProvider(String) method on this interface to obtain new JcpProvider objects. Each implementation may support one or more different "services" (e.g. for different types of underlying network substrate). A list of available services can be obtained via the getServices() method.

Applications may also supply optional arguments to the JcpProvider through the getProvider(String) method. These arguments are appended to the providerString argument passed to the getProvider(String) method. The providerString argument has the following format:

< service name > ; arg1 = val1; arg2 = val2; ...

Where < service name > is not optional, and each optional argument pair which follows is separated by a semi-colon. The keys for these arguments is implementation specific, except for two standard-defined keys:

  1. login: provides the login user name to the Provider.
  2. passwd: provides a password to the Provider.


Method Summary
 java.lang.String getName()
          Returns the name of this JcpPeer object instance.
 JcpProvider getProvider(java.lang.String providerString)
          Returns an instance of a Provider object given a string argument which contains the desired service name.
 java.lang.String[] getServices()
          Returns the services that this implementation supports.
 

Method Detail

getName

public java.lang.String getName()
Returns the name of this JcpPeer object instance. The name is the same name used as an argument to JcpPeerFactory.getJcpPeer(String) method.

Returns:
The name of this JcpPeer object instance.

getServices

public java.lang.String[] getServices()
Returns the services that this implementation supports. This method returns null if no services are supported.
Returns:
services that this implementation supports.

getProvider

public JcpProvider getProvider(java.lang.String providerString)
                        throws ProviderUnavailableException
Returns an instance of a Provider object given a string argument which contains the desired service name. Optional arguments may also be provided in this string, with the following format:

< service name > ; arg1 = val1; arg2 = val2; ...

Where < service name > is not optional, and each optional argument pair which follows is separated by a semi-colon. The keys for these arguments is implementation specific, except for two standard-defined keys:

  1. login: provides the login user name to the Provider.
  2. passwd: provides a password to the Provider.

If the argument is null, this method returns some default Provider as determined by the JCPPeer object. The returned Provider is not in the JcpProvider.SHUTDOWN state.Note that this may also result in the application obtaining a reference to a Provider which has already been created.

Post-conditions:

  1. this.getProvider().getState() != JcpProvider.SHUTDOWN
Parameters:
providerString - is the name of the desired service.
Returns:
An instance of the JcpProvider object.
Throws:
ProviderUnavailableException - indicates a Provider corresponding to the given string is unavailable.


3 Oct 2000
If you have any comments or queries, please mail them to jcc@research.telcordia.com


Copyright-2000 Sun Microsystems