JCAT
v0.3.1

javax.csapi.cc.jcc
Interface JccPeer


public interface JccPeer

The JccPeer interface represents a vendor's particular implementation of the JCC API.

Other interfaces derived from JCC are expected to implement this interface. The JccPeer object, returned by the JccPeerFactory.getJccPeer(String) method, determines which JccProviders are made available to the application.

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

Obtaining a JccProvider

Applications use the getProvider(String) method on this interface to obtain new JccProvider 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 JccProvider 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.

Since:
1.0b

Method Summary
 java.lang.String getName()
          Returns the name of this JccPeer object instance.
 JccProvider 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 JccPeer object instance. The name is the same name used as an argument to JccPeerFactory.getJccPeer(String) method.

Returns:
The name of this JccPeer 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 JccProvider 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 JccPeer object. The returned Provider is not in the JccProvider.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() != SHUTDOWN

Parameters:
providerString - is the name of the desired service.
Returns:
An instance of the JccProvider object.
Throws:
ProviderUnavailableException - indicates a Provider corresponding to the given string is unavailable.

JCAT
v0.3.1

August, 2003
If you have any comments or queries, please mail them to JSR-122-EG@JCP.ORG

Copyright - 2001, 2003 Sun Microsystems