com.funambol.syncclient.spds
Class WBXMLSyncMLClient

java.lang.Object
  extended by com.funambol.syncclient.spds.WBXMLSyncMLClient
All Implemented Interfaces:
SyncMLClient

public class WBXMLSyncMLClient
extends java.lang.Object
implements SyncMLClient

Implement send / receive message in WBXML format by HttpConnection. The charSet is specified with the system property spds.charset; if DEFAULT value, the default charSet value is taken.
if no value, the default charSet API UTF-8 value is taken.

Version:
$Id: WBXMLSyncMLClient.java,v 1.3 2007-12-22 18:09:17 nichele Exp $

Constructor Summary
WBXMLSyncMLClient()
           
 
Method Summary
 void addSyncTransportListener(SyncTransportListener listener)
          Register a new SyncTransportListener.
 java.lang.String getCharSet()
          Getter for property charSet.
 java.lang.String getProxyHost()
          Getter for property proxyHost.
 int getProxyPort()
          Getter for property proxyPort.
 int getTimeout()
          Getter for property timeout.
 boolean getUseProxy()
          Getter for property useProxy.
 java.lang.String getUserAgent()
           
 void removeSyncTransportListener(SyncTransportListener listener)
          Remove the specified SyncTransportListener.
protected  java.lang.String sendMessage(byte[] bytes)
           
 java.lang.String sendMessage(java.lang.String msg)
           
 java.lang.String sendMessage(java.lang.String msg, java.lang.String charSet)
           
 void setCharSet(java.lang.String charSet)
          Setter for property charSet
 void setContentType(java.lang.String contentType)
          Setter for property contentType
 void setMsisdnKey(java.lang.String msisdnKey)
          Setter for property MSISDN header
 void setMsisdnVal(java.lang.String msisdnVal)
          Setter for property of the value of the MSISDN header.
 void setProxyHost(java.lang.String proxyHost)
          Setter for property proxyHost.
 void setProxyPort(int proxyPort)
          Setter for property proxyPort.
 void setTimeout(int timeout)
          Setter for property timeout.
 void setUrl(java.lang.String url)
          Setter for property url.
 void setUseMsisdn(boolean useMsisdn)
          Setter for property 'useMsisdn'
 void setUseProxy(boolean useProxy)
          Setter for property userProxy.
 void setUserAgent(java.lang.String userAgent)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WBXMLSyncMLClient

public WBXMLSyncMLClient()
Method Detail

sendMessage

public java.lang.String sendMessage(java.lang.String msg)
                             throws java.io.IOException
Specified by:
sendMessage in interface SyncMLClient
Throws:
java.io.IOException

sendMessage

public java.lang.String sendMessage(java.lang.String msg,
                                    java.lang.String charSet)
                             throws java.io.IOException
Specified by:
sendMessage in interface SyncMLClient
Throws:
java.io.IOException

getCharSet

public java.lang.String getCharSet()
Getter for property charSet.

Returns:
Value of property charSet.

setCharSet

public void setCharSet(java.lang.String charSet)
Setter for property charSet

Parameters:
charSet - New value of property charSet.

setContentType

public void setContentType(java.lang.String contentType)
Setter for property contentType

Parameters:
contentType - New value of property contentType.

getTimeout

public int getTimeout()
Getter for property timeout.

Returns:
Value of property timeout.

setTimeout

public void setTimeout(int timeout)
Setter for property timeout. Default: 60 sec. 0 means forever

Parameters:
timeout - New value of property timeout.

setUseMsisdn

public void setUseMsisdn(boolean useMsisdn)
Setter for property 'useMsisdn'

Parameters:
useMsisdn - The value whether the MSISDN header must be used.

setMsisdnKey

public void setMsisdnKey(java.lang.String msisdnKey)
Setter for property MSISDN header

Parameters:
msisdnKey - The MSISDN header.

setMsisdnVal

public void setMsisdnVal(java.lang.String msisdnVal)
Setter for property of the value of the MSISDN header.

Parameters:
msisdnVal - The value of the MSISDN header.

getProxyHost

public java.lang.String getProxyHost()
Getter for property proxyHost.

Returns:
Value of property proxyHost.

setProxyHost

public void setProxyHost(java.lang.String proxyHost)
Setter for property proxyHost.

Parameters:
proxyHost - New value of property proxyHost.

getProxyPort

public int getProxyPort()
Getter for property proxyPort.

Returns:
Value of property proxyPort.

setProxyPort

public void setProxyPort(int proxyPort)
Setter for property proxyPort.

Parameters:
proxyPort - New value of property proxyPort.

getUseProxy

public boolean getUseProxy()
Getter for property useProxy.

Returns:
Value of property useProxy.

setUseProxy

public void setUseProxy(boolean useProxy)
Setter for property userProxy.

Parameters:
useProxy - New value of property userProxy.

setUrl

public void setUrl(java.lang.String url)
            throws java.io.IOException
Setter for property url.

Parameters:
url - New value of property url.
Throws:
java.io.IOException

getUserAgent

public java.lang.String getUserAgent()

setUserAgent

public void setUserAgent(java.lang.String userAgent)

addSyncTransportListener

public void addSyncTransportListener(SyncTransportListener listener)
Register a new SyncTransportListener.

Parameters:
listener -

removeSyncTransportListener

public void removeSyncTransportListener(SyncTransportListener listener)
Remove the specified SyncTransportListener.

Parameters:
listener -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

sendMessage

protected java.lang.String sendMessage(byte[] bytes)
                                throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2010 Funambol. All Rights Reserved.