com.skype.connector.win32
Class Win32Connector

java.lang.Object
  extended by com.skype.connector.Connector
      extended by com.skype.connector.win32.Win32Connector

public final class Win32Connector
extends Connector

Implementation of a connector for Windows. This implementation uses a small dll to connect. The WindowsConnector uses SWT library. Choose wisely.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.skype.connector.Connector
Connector.Status
 
Method Summary
protected  Connector.Status connect(int timeout)
          Connect to Skype client.
protected  void disposeImpl()
          Clean up the connector and the native lib.
 String getInstalledPath()
          Return the path of Skype.exe.
static Connector getInstance()
          Get singleton instance.
protected  void initializeImpl()
          Initialize the connector.
 void jni_onAttach(int status)
          Set the connector status.
 void jni_onSkypeMessage(String message)
          This method gets called when the native lib has a message received.
protected  void sendApplicationName(String applicationName)
          Send applicationname to Skype client.
protected  void sendCommand(String command)
          Send a command to the Skype client.
 
Methods inherited from class com.skype.connector.Connector
addConnectorListener, addConnectorListener, addConnectorListener, connect, dispose, execute, execute, execute, execute, execute, executeWithId, executeWithoutTimeout, fireMessageReceived, getApplicationName, getCommandTimeout, getConnectTimeout, getDebugOut, getStatus, getStringProperty, initialize, isRunning, removeConnectorListener, sendProtocol, setApplicationName, setCommandTimeout, setConnectTimeout, setDebug, setDebugOut, setDebugOut, setInstance, setStatus, setStringProperty, useJNIConnector, waitForEndWithId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Connector getInstance()
Get singleton instance.

Returns:
instance.

getInstalledPath

public String getInstalledPath()
Return the path of Skype.exe.

Overrides:
getInstalledPath in class Connector
Returns:
absolute path to Skype.exe.

initializeImpl

protected void initializeImpl()
Initialize the connector.

Specified by:
initializeImpl in class Connector
Parameters:
timeout - maximum time in miliseconds to initialize.

connect

protected Connector.Status connect(int timeout)
                            throws ConnectorException
Connect to Skype client.

Specified by:
connect in class Connector
Parameters:
timeout - the maximum time in milliseconds to connect.
Returns:
Status the status after connecting.
Throws:
ConnectorException - when connection can not be established.

sendApplicationName

protected void sendApplicationName(String applicationName)
                            throws ConnectorException
Send applicationname to Skype client.

Overrides:
sendApplicationName in class Connector
Parameters:
applicationName - The new Application name.
Throws:
ConnectorException - when Skype Client connection has gone bad.

jni_onAttach

public void jni_onAttach(int status)
Set the connector status. This method will be called by the native lib.

Parameters:
status - The new status.

jni_onSkypeMessage

public void jni_onSkypeMessage(String message)
This method gets called when the native lib has a message received.

Parameters:
message - The received message.

disposeImpl

protected void disposeImpl()
Clean up the connector and the native lib.

Specified by:
disposeImpl in class Connector

sendCommand

protected void sendCommand(String command)
Send a command to the Skype client.

Specified by:
sendCommand in class Connector
Parameters:
command - The command to send.


Copyright © 2004-2011. All Rights Reserved.