com.skype.ipc
Class ClientConfiguration

java.lang.Object
  extended by com.skype.ipc.ClientConfiguration

public class ClientConfiguration
extends java.lang.Object

Configuration of the ipc wrapper. All these parameters are checked once at the initialization phase, and any modifications done afterwards will be ignored.


Field Summary
protected  boolean useLocalTransport
           
 
Constructor Summary
ClientConfiguration()
           
 
Method Summary
 void dontUseTls()
          turn off Tls (use it only if the runtime support this)
 void fowardStringChangedValue()
          By default a runtime only forwards the int alike value in case of property changes this function allows forwarding the string values as well which can highly improve the performances if your application is always getting the strings on the change notification.
 boolean generateTransportLog()
          check if a transport log shall be produced
 void generateTransportLog(java.lang.String baseName)
          turn on the recording of the data exchanged between the runtime and the java client or turn it off off the file name is empty (default).
 java.lang.String getCertificate()
          Do not use, internal only, loads the certicate
 int getConnectionNumRetries()
          check how many attempts at connecting to the runtime will be done
 int getConnectionRetryInitialLatency()
          check the initial latency used in case of retries
 java.lang.String getHandshakeSetup()
          internal, don't use unless implementing a TransportFactory
 java.lang.String getInputTransportLogName()
          get the input transport log file name
 java.lang.String getIp()
          get the ip address to be used with a TCP connection
 java.lang.String getOutputTransportLogName()
          get the output transport log file name
 int getPort()
          get the port to be used with a TCP connection
 java.security.PrivateKey getPrivateKey()
          Do not use, internal only, loads the certicate
 TransportFactory getTransportFactory()
           
 int getTransportInputBufferSize()
          check the recommended transport input buffer size
 int getTransportOutputBufferSize()
          check the recommended transport output buffer size
 java.security.cert.X509Certificate getX509Certificate()
          Do not use, internal only, loads the certicate
 boolean isDispatchAll()
          tells if the event or a property change notification will always be dispatched (default if false)
 boolean isWithoutTls()
          check if Tls mode is turned off
 boolean isWithTls()
          check if Tls mode is turned on (default)
 java.lang.String setCertificate(java.lang.String certificateFilename)
          specify the certificate file to be used for the Tls connection
 void setCertificateContents(byte[] contents)
          Do not use, internal only
 int setConnectionNumRetries(int num)
          Decide how many attempts at connecting to the runtime shall be done
 int setConnectionRetryInitialLatency(int ms)
          Decide what initial latency in milliseconds will be used between each retry The policy is to increase this latency by 50% after each failed retry.
 void setDispatchAll()
          when an event or a property change notification is recieved on an object that doesn't exist yet, create the object and forward the notification.
 void setPrivateKeyContents(byte[] contents)
          Do not use, internal only
 void setTcpTransport()
          use TCP socket for the connection to the runtime with the default settings, port 8963 on the local host
 void setTcpTransport(java.lang.String ip, int port)
          use TCP socket for the connection to the runtime with custom settings
 void setTransportFactory(TransportFactory factory)
          By default only a TCP transport is supported to communicate with the runtime, but with setting a TransportFactory 1 further non portable transport could be used, provided that they are supported by the runtime as well.
 int setTransportInputBufferSize(int bytes)
          Recommend the transport input buffer size (may or may not be used by the transport, indicative only) for the connection to the runtime
 int setTransportOutputBufferSize(int bytes)
          Recommend the transport output buffer size (may or may not be used by the transport, indicative only) for the connection to the runtime
 boolean useTcpTransport()
          tells if the configuration was set to use a TCP socket with runtime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useLocalTransport

protected boolean useLocalTransport
Constructor Detail

ClientConfiguration

public ClientConfiguration()
Method Detail

setTcpTransport

public void setTcpTransport()
use TCP socket for the connection to the runtime with the default settings, port 8963 on the local host


setTcpTransport

public void setTcpTransport(java.lang.String ip,
                            int port)
use TCP socket for the connection to the runtime with custom settings

Parameters:
ip - the ip address of the runtime host
port - the port used by the runtime

useTcpTransport

public boolean useTcpTransport()
tells if the configuration was set to use a TCP socket with runtime


getIp

public java.lang.String getIp()
get the ip address to be used with a TCP connection


getPort

public int getPort()
get the port to be used with a TCP connection


setDispatchAll

public void setDispatchAll()
when an event or a property change notification is recieved on an object that doesn't exist yet, create the object and forward the notification. The default behavior is to discard the notification.


isDispatchAll

public boolean isDispatchAll()
tells if the event or a property change notification will always be dispatched (default if false)


dontUseTls

public void dontUseTls()
turn off Tls (use it only if the runtime support this)


isWithoutTls

public boolean isWithoutTls()
check if Tls mode is turned off


isWithTls

public boolean isWithTls()
check if Tls mode is turned on (default)


setCertificate

public java.lang.String setCertificate(java.lang.String certificateFilename)
specify the certificate file to be used for the Tls connection

Parameters:
certificateFilename - .pem file (ensure that .der is present as well) returns the input filename argument

setCertificateContents

public void setCertificateContents(byte[] contents)
Do not use, internal only


setPrivateKeyContents

public void setPrivateKeyContents(byte[] contents)
Do not use, internal only


getCertificate

public java.lang.String getCertificate()
                                throws java.io.IOException
Do not use, internal only, loads the certicate

Throws:
java.io.IOException

getX509Certificate

public java.security.cert.X509Certificate getX509Certificate()
                                                      throws java.io.IOException
Do not use, internal only, loads the certicate

Throws:
java.io.IOException

getPrivateKey

public java.security.PrivateKey getPrivateKey()
                                       throws java.io.IOException
Do not use, internal only, loads the certicate

Throws:
java.io.IOException

setConnectionNumRetries

public int setConnectionNumRetries(int num)
Decide how many attempts at connecting to the runtime shall be done

Parameters:
num - with num > 0 and num < 10 return num if valid or latest valid input or default, ie 3

getConnectionNumRetries

public int getConnectionNumRetries()
check how many attempts at connecting to the runtime will be done


setConnectionRetryInitialLatency

public int setConnectionRetryInitialLatency(int ms)
Decide what initial latency in milliseconds will be used between each retry The policy is to increase this latency by 50% after each failed retry. The default is 600ms, so that the default pattern is 600 (+600ms) -> 900 (+1500ms) -> 1350 (+2850ms)

Parameters:
ms - with ms > 100 and ms < 1000 return ms if valid or latest valid input or default, ie 600

getConnectionRetryInitialLatency

public int getConnectionRetryInitialLatency()
check the initial latency used in case of retries


setTransportInputBufferSize

public int setTransportInputBufferSize(int bytes)
Recommend the transport input buffer size (may or may not be used by the transport, indicative only) for the connection to the runtime

Parameters:
bytes - with bytes >= 256 and bytes < 8096 , bytes is rounded to the next power of 2 return bytes if valid or latest valid input or default, ie 512

getTransportInputBufferSize

public int getTransportInputBufferSize()
check the recommended transport input buffer size


setTransportOutputBufferSize

public int setTransportOutputBufferSize(int bytes)
Recommend the transport output buffer size (may or may not be used by the transport, indicative only) for the connection to the runtime

Parameters:
bytes - with bytes >= 256 and bytes < 8096 , bytes is rounded to the next power of 2 return bytes if valid or latest valid input or default, ie 512

getTransportOutputBufferSize

public int getTransportOutputBufferSize()
check the recommended transport output buffer size


generateTransportLog

public void generateTransportLog(java.lang.String baseName)
turn on the recording of the data exchanged between the runtime and the java client or turn it off off the file name is empty (default). This is configured once

Parameters:
baseName - is the base name for the transport log which consists in 2 files - _log_in.1, data from the runtime to the client - _log_out.1, data from the client to the runtime

generateTransportLog

public boolean generateTransportLog()
check if a transport log shall be produced


getInputTransportLogName

public java.lang.String getInputTransportLogName()
get the input transport log file name


getOutputTransportLogName

public java.lang.String getOutputTransportLogName()
get the output transport log file name


setTransportFactory

public void setTransportFactory(TransportFactory factory)
By default only a TCP transport is supported to communicate with the runtime, but with setting a TransportFactory 1 further non portable transport could be used, provided that they are supported by the runtime as well. For example android or linux runtime shall accept unix socket too.


getTransportFactory

public TransportFactory getTransportFactory()

fowardStringChangedValue

public void fowardStringChangedValue()
By default a runtime only forwards the int alike value in case of property changes this function allows forwarding the string values as well which can highly improve the performances if your application is always getting the strings on the change notification.


getHandshakeSetup

public java.lang.String getHandshakeSetup()
internal, don't use unless implementing a TransportFactory



Copyright © 2010, 2011 Skype Technologies. All Rights Reserved.