Top Description Methods
javax.xml.registry

public Interface Connection

Known Direct Subinterfaces
javax.xml.registry.FederatedConnection
Imports
javax.xml.registry.infomodel.*, java.util.*

This class represents a connection between a JAXR client and a JAXR provider.
Author
Farrukh S. Najmi
See Also
ConnectionFactory

Method Summary

Modifier and TypeMethod and Description
public void
close()

Closes a Connection when it is no longer needed.

public Set<E>

Returns:

Set of java.lang.Object instances. The Collection may be empty but not null.
getCredentials
()

Gets the credentials associated with this client.

public RegistryService

Returns:

the RegistryService associated with this object
getRegistryService
()

Gets the RegistryService interface associated with the Connection.

public boolean

Returns:

true if Connection is closed; false otherwise
isClosed
()

Indicated whether this Connection has been closed or not.

public boolean

Returns:

true if Connection is synchronous (default); false otherwise
isSynchronous
()

Indicates whether a client uses synchronous communication with JAXR provider or not.

public void
setCredentials(Set<E>
a Collection oj java.lang.Objects which provide identity related information for the caller.
credentials
)

Sets the Credentials associated with this client.

public void
setSynchronous(boolean
true if Connection is desired to be synchronous; false otherwise
sync
)

Sets whether the client uses synchronous communication or not.

Method Detail

closeback to summary
public void close() throws JAXRException

Closes a Connection when it is no longer needed. 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
Exceptions
JAXRException:
If the JAXR provider encounters an internal error
getCredentialsback to summary
public Set<E> getCredentials() throws JAXRException

Gets the credentials associated with this client.

Capability Level: 0
Returns:Set<E>

Set of java.lang.Object instances. The Collection may be empty but not null.

Exceptions
JAXRException:
If the JAXR provider encounters an internal error
getRegistryServiceback to summary
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
Returns:RegistryService

the RegistryService associated with this object

Exceptions
JAXRException:
If the JAXR provider encounters an internal error
See Also
RegistryService
isClosedback to summary
public boolean isClosed() throws JAXRException

Indicated whether this Connection has been closed or not.

Capability Level: 0
Returns:boolean

true if Connection is closed; false otherwise

Exceptions
JAXRException:
If the JAXR provider encounters an internal error
isSynchronousback to summary
public boolean isSynchronous() throws JAXRException

Indicates whether a client uses synchronous communication with JAXR provider or not. A JAXR provider must support both modes of communication. A JAXR client can choose which mode it wants to use.

Capability Level: 0
Returns:boolean

true if Connection is synchronous (default); false otherwise

Exceptions
JAXRException:
If the JAXR provider encounters an internal error
setCredentialsback to summary
public void setCredentials(Set<E> 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
Parameters
credentials:Set<E>

a Collection oj java.lang.Objects which provide identity related information for the caller.

Exceptions
JAXRException:
If the JAXR provider encounters an internal error
setSynchronousback to summary
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
Parameters
sync:boolean

true if Connection is desired to be synchronous; false otherwise

Exceptions
JAXRException:
If the JAXR provider encounters an internal error