org.opensync.engine.server
Class DefaultConnector

java.lang.Object
  extended byorg.opensync.engine.server.DefaultConnector
All Implemented Interfaces:
Connector, java.io.Serializable
Direct Known Subclasses:
BDConnector, FileConnector

public abstract class DefaultConnector
extends java.lang.Object
implements Connector, java.io.Serializable

The default implementation of the connector interface

Version:
1.0
Author:
smalbequ
See Also:
Serialized Form

Field Summary
protected  Adapter adapter
          The adapter used by the connector to adapt the data format of the source to the OpenSync format
protected  boolean incremental
          Incremental synchronization flag.
protected  Protocol protocol
          The protocol used by the connector to connect to the source
protected  java.lang.String type
          The type of the connector (eg: bd, file, ...)
protected  java.lang.String url
          The url of the source
 
Fields inherited from interface org.opensync.engine.server.Connector
BD, FILE
 
Constructor Summary
DefaultConnector()
          Construct a DefaultConnector
 
Method Summary
 Adapter getAdapter()
          Get the adapter used by the connector to adapt the data format of the source to the OpenSync format
 boolean getIncremental()
           
 Protocol getProtocol()
          Get the protocol used by the connector to connect to the source
 java.lang.String getType()
          Get the type of the connector (eg: bd, file, ...)
 java.lang.String getUrl()
          Get the url of the source
 void release()
           
 void releaseWithException()
           
 void setAdapter(Adapter adapter)
          Set the adapter used by the connector to adapt the data format of the source to the OpenSync format
 void setIncremental(boolean incremental)
           
 void setProtocol(Protocol protocol)
          Set the protocol used by the connector to connect to the source
 void setType(java.lang.String type)
          Set the name of the connector (eg: bd, file, ...)
 void setUrl(java.lang.String url)
          Set the url of the source
 java.lang.String toString()
          Used only for debugging
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected java.lang.String type
The type of the connector (eg: bd, file, ...)


adapter

protected Adapter adapter
The adapter used by the connector to adapt the data format of the source to the OpenSync format


protocol

protected Protocol protocol
The protocol used by the connector to connect to the source


url

protected java.lang.String url
The url of the source


incremental

protected boolean incremental
Incremental synchronization flag.

Constructor Detail

DefaultConnector

public DefaultConnector()
Construct a DefaultConnector

Method Detail

validate

public void validate()
              throws OpenSyncException
Specified by:
validate in interface Connector
Throws:
OpenSyncException

release

public void release()
             throws java.sql.SQLException
Specified by:
release in interface Connector
Throws:
java.sql.SQLException

releaseWithException

public void releaseWithException()
                          throws java.sql.SQLException
Specified by:
releaseWithException in interface Connector
Throws:
java.sql.SQLException

setType

public void setType(java.lang.String type)
Set the name of the connector (eg: bd, file, ...)

Parameters:
type - the type of the connector

getType

public java.lang.String getType()
Get the type of the connector (eg: bd, file, ...)

Specified by:
getType in interface Connector

toString

public java.lang.String toString()
Used only for debugging


setAdapter

public void setAdapter(Adapter adapter)
Set the adapter used by the connector to adapt the data format of the source to the OpenSync format

Parameters:
adapter - the adapter of the connector

getAdapter

public Adapter getAdapter()
Get the adapter used by the connector to adapt the data format of the source to the OpenSync format

Specified by:
getAdapter in interface Connector

setProtocol

public void setProtocol(Protocol protocol)
Set the protocol used by the connector to connect to the source

Parameters:
protocol - the protocol of the connector

getProtocol

public Protocol getProtocol()
Get the protocol used by the connector to connect to the source

Specified by:
getProtocol in interface Connector

setUrl

public void setUrl(java.lang.String url)
Set the url of the source

Parameters:
url - the url of the source

getUrl

public java.lang.String getUrl()
Get the url of the source

Specified by:
getUrl in interface Connector

setIncremental

public void setIncremental(boolean incremental)
Specified by:
setIncremental in interface Connector

getIncremental

public boolean getIncremental()
Specified by:
getIncremental in interface Connector


Copyright © 2004 sourceforge. All Rights Reserved.