com.endeca.itl.service
Class ServiceLocator<T>

java.lang.Object
  extended by com.endeca.itl.service.ServiceLocator<T>
Direct Known Subclasses:
RecordStoreLocator

public abstract class ServiceLocator<T>
extends Object


Constructor Summary
ServiceLocator(String host, int port, String instanceName)
           
 
Method Summary
 String getHost()
           
 String getInstanceName()
           
 KeyStore getKeyStore()
           
 int getPort()
           
protected abstract  QName getPortName()
           
 T getService()
           
protected abstract  Class<T> getServiceClass()
           
protected abstract  QName getServiceName()
           
 int getSocketConnectTimeout()
           
 int getSocketReceiveTimeout()
           
 KeyStore getTrustStore()
           
 String getWsdlUrl()
           
 boolean isAllowChunking()
           
 boolean isPortSsl()
          Return whether or not the port is interpreted an SSL port.
 void ping()
          Attempts to ping the Service
 void setAllowChunking(boolean allowChunking)
           
 void setKeyStore(String ksType, String ksLocation, String ksPassword)
          Set the SSL keystore that will be used by the client.
 void setPortSsl(boolean isPortSsl)
          Sets whether or not the port is interpreted an SSL port.
 void setSocketConnectTimeout(int timeout)
           
 void setSocketReceiveTimeout(int timeout)
           
 void setTrustStore(String tsType, String tsLocation, String tsPassword)
          Set the SSL trust-store that will be used by the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceLocator

public ServiceLocator(String host,
                      int port,
                      String instanceName)
Method Detail

setSocketReceiveTimeout

public void setSocketReceiveTimeout(int timeout)

getSocketReceiveTimeout

public int getSocketReceiveTimeout()
Returns:
the timeout for any given request

setSocketConnectTimeout

public void setSocketConnectTimeout(int timeout)

getSocketConnectTimeout

public int getSocketConnectTimeout()
Returns:
the timeout when establishing a connection

setAllowChunking

public void setAllowChunking(boolean allowChunking)

isAllowChunking

public boolean isAllowChunking()

setPortSsl

public void setPortSsl(boolean isPortSsl)
Sets whether or not the port is interpreted an SSL port. Defaults to false.

Parameters:
isPortSsl -

isPortSsl

public boolean isPortSsl()
Return whether or not the port is interpreted an SSL port. Defaults to false.


getInstanceName

public String getInstanceName()

getHost

public String getHost()

getPort

public int getPort()

getService

public T getService()

ping

public void ping()
          throws IOException
Attempts to ping the Service

Throws:
IOException - if there is an error during ping

getWsdlUrl

public String getWsdlUrl()

getKeyStore

public KeyStore getKeyStore()
Returns:
the SSL KeyStore used by the client

setKeyStore

public void setKeyStore(String ksType,
                        String ksLocation,
                        String ksPassword)
Set the SSL keystore that will be used by the client.

Parameters:
ksType - e.g. "JKS"
ksLocation - the absolute path to the keystore file
ksPassword - the keystore password

getTrustStore

public KeyStore getTrustStore()
Returns:
the SSL trust-store used by the client

setTrustStore

public void setTrustStore(String tsType,
                          String tsLocation,
                          String tsPassword)
Set the SSL trust-store that will be used by the client.

Parameters:
tsType - e.g. "JKS"
tsLocation - the absolute path to the trust-store file
tsPassword - the trust-store password

getServiceName

protected abstract QName getServiceName()

getPortName

protected abstract QName getPortName()

getServiceClass

protected abstract Class<T> getServiceClass()


Copyright © 2011 Endeca. All Rights Reserved.