org.netbeans.lib.collab
Interface CollaborationSessionProvider


public interface CollaborationSessionProvider

Interface defining a Collaboratio Session Provider. implementations of this interface are loaded by CollaborationSessionFactory.

Since:
version 0.1

Method Summary
 void close()
          tells the provider to release any resources.
 ApplicationInfo getApplicationInfo()
           
 CollaborationSession getSession(java.lang.String serviceUrl, java.lang.String loginName, java.lang.String password, CollaborationSessionListener listener)
          creates a collaboration session.
 CollaborationSession getSession(java.lang.String serviceUrl, java.lang.String destination, java.lang.String loginName, java.lang.String password, CollaborationSessionListener listener)
          creates a collaboration session.
 boolean isSASLProviderRegistered(java.lang.String mechanism)
          Find out if there is a provider factory registered for the mechanism specified.
 void register(java.lang.String serviceURL, RegistrationListener listener)
          registers the user with the server
 void registerProvider(SASLClientProviderFactory providerfac)
          Register a SASL client side provider factory with the session provider.
 void setApplicationInfo(ApplicationInfo appinfo)
           
 

Method Detail

getSession

public CollaborationSession getSession(java.lang.String serviceUrl,
                                       java.lang.String loginName,
                                       java.lang.String password,
                                       CollaborationSessionListener listener)
                                throws CollaborationException
creates a collaboration session.

Parameters:
serviceUrl - service access point. May include hostname domain name, port number, or other parameter to be interpreted by API implementations to establish a connection with the service.
loginName - login name
password - user password
listener - session listener to convey asynchronous errors and events.
Returns:
an authenticated collaboration services session.
Throws:
CollaborationException

getSession

public CollaborationSession getSession(java.lang.String serviceUrl,
                                       java.lang.String destination,
                                       java.lang.String loginName,
                                       java.lang.String password,
                                       CollaborationSessionListener listener)
                                throws CollaborationException
creates a collaboration session.

Parameters:
serviceUrl - service access point. May include hostname domain name, port number, or other parameter to be interpreted by API implementations to establish a connection with the service.
destination - address to be used by others to identify the created session. In the case of XMPP, this is the full JID (resource included) used by this session.
loginName - login name
password - user password
listener - session listener to convey asynchronous errors and events.
Returns:
an authenticated collaboration services session.
Throws:
CollaborationException

register

public void register(java.lang.String serviceURL,
                     RegistrationListener listener)
              throws CollaborationException
registers the user with the server

Parameters:
serviceURL - hostname of the IM server
listener - registration listener to convey asynchronous registration events.
Returns:
true if registration is successful
Throws:
CollaborationException

setApplicationInfo

public void setApplicationInfo(ApplicationInfo appinfo)
                        throws CollaborationException
Throws:
CollaborationException

getApplicationInfo

public ApplicationInfo getApplicationInfo()
                                   throws CollaborationException
Throws:
CollaborationException

registerProvider

public void registerProvider(SASLClientProviderFactory providerfac)
Register a SASL client side provider factory with the session provider. If multiple provider factories are registered and they support same subset of mechanism's , then the last factory registered will override the previous ones.


isSASLProviderRegistered

public boolean isSASLProviderRegistered(java.lang.String mechanism)
Find out if there is a provider factory registered for the mechanism specified. There will always be a provider for old jabber auth , and usually SASL PLAIN and SASL DIGEST-MD5 should also be always present by default.

Returns:
true if there is a provider registered to handle the specified mechanism.

close

public void close()
tells the provider to release any resources.