de.fhhannover.inform.trust.ifmapj.channel
Class CommunicationHandlerFactory

java.lang.Object
  extended by de.fhhannover.inform.trust.ifmapj.channel.CommunicationHandlerFactory

public abstract class CommunicationHandlerFactory
extends Object


Field Summary
static String HANDLER_PROPERTY
           
 
Constructor Summary
CommunicationHandlerFactory()
           
 
Method Summary
static CommunicationHandler newHandler(String url, String user, String pass, SSLSocketFactory sslSocketFactory, HostnameVerifier verifier)
          Create a CommunicationHandler instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HANDLER_PROPERTY

public static final String HANDLER_PROPERTY
See Also:
Constant Field Values
Constructor Detail

CommunicationHandlerFactory

public CommunicationHandlerFactory()
Method Detail

newHandler

public static CommunicationHandler newHandler(String url,
                                              String user,
                                              String pass,
                                              SSLSocketFactory sslSocketFactory,
                                              HostnameVerifier verifier)
                                       throws InitializationException
Create a CommunicationHandler instance. The CommunicationHandler implementation returned by this method depends on the system property ifmapj.communication.handler. If it is set to java an instance of JavaCommunicationHandler is returned, if set to apache instead, ApacheCoreCommunicationHandler is used. If it is not set, either one is returned, preferring ApacheCoreCommunicationHandler.

Parameters:
url - The url to connect to.
user - for basic auth, if user != null -> pass != null
pass - for basic auth, if pass != null -> user != null
sslSocketFactory - the SSLSocketFactory to be used
Returns:
the new CommunicationHandler
Throws:
InitializationException


Copyright © 2012 Trust@FHH. All Rights Reserved.