javax.xml.registry
Interface Connection

All Known Subinterfaces:
Federation

public interface Connection

This class represents a connection between a JAXR client and a JAXR provider.

See Also:
ConnectionFactory

Method Summary
 void close()
          Since a provider typically allocates significant resources outside the JVM on behalf of a Connection, clients should close them when they are not needed.
 java.util.Set getCredentials()
          Gets the credentails associated with this client.
 RegistryService getRegistryService()
          Gets the RegistryService interface associated with the Connection.
 boolean isClosed()
          Return true if this Connection has been closed.
 boolean isSynchronous()
          Return true if client uses synchronous communication with JAXR provider.
 void setCredentials(java.util.Set credentials)
          Sets the Credentials associated with this client.
 void setSynchronous(boolean sync)
          Sets whether the client uses synchronous communication or not.
 

Method Detail

getRegistryService

public RegistryService getRegistryService()
                                   throws JAXRException
Gets the RegistryService interface associated with the Connection. If a Connection property (e.g. credentials) is set after the client calls getRegistryService then the newly set Connection property is visible to the RegistryService previously returned by this call.

Capability Level: 0
See Also:
RegistryService

close

public void close()
           throws JAXRException
Since a provider typically allocates significant resources outside the JVM on behalf of a Connection, clients should close them when they are not needed.

Capability Level: 0
Throws:
JAXRException - if a JARR error occurs.

isClosed

public boolean isClosed()
                 throws JAXRException
Return true if this Connection has been closed.

Capability Level: 0

isSynchronous

public boolean isSynchronous()
                      throws JAXRException
Return true if client uses synchronous communication with JAXR provider. Note that a JAXR provider must support both modes of communication, while the client can choose which mode it wants to use. Default is a return value of true (synchronous communication).

Capability Level: 0

setSynchronous

public void setSynchronous(boolean sync)
                    throws JAXRException
Sets whether the client uses synchronous communication or not. A JAXR client may dynamically change its communication style preference.

Capability Level: 0

setCredentials

public void setCredentials(java.util.Set credentials)
                    throws JAXRException
Sets the Credentials associated with this client. The credentials is used to authenticate the client with the JAXR provider. A JAXR client may dynamically change its identity by changing the credentials associated with it.

Capability Level: 0

getCredentials

public java.util.Set getCredentials()
                             throws JAXRException
Gets the credentails associated with this client.

Capability Level: 0