com.syncbuilder.sync
Interface SyncHandler
- All Known Implementing Classes:
- DispatchSyncHandler
- public abstract interface SyncHandler
Implementations of this interface are used in conjunction with synchronization servers
(SyncServer, SyncMan).
They contain all the application-specific knowlegde that is required to service incoming
connections.
The server will accept connection requests from Palm devices and then direct them
at your implementation of this interface.
Only one instance of your implementation will be used to service all incoming connections,
which may occur simultaneously.
This means that your implementation of this interface should either not use global
variables, or needs to carefully synchronize access to them.
Basically, this is an adaption of JavaSoft's Servlet principle. You might want to read
the documentation that comes with JavaSoft's JSDK to gain a better understanding.
- See Also:
SyncServer,
SyncMan
init
public void init(SyncContext context)
throws java.lang.Exception
- Initialize the SyncHandler. This method is guaranteed to be called exactly once before the
SyncHandler is being used to handle incoming connections.
- Parameters:
context - a reference to the execution environment, which provides configuration data
and logging facilities
service
public void service(SyncSession session,
Link link)
throws java.lang.Exception
- Service an incoming connection. This method is invoked everytime a device needs to be serviced.
- Parameters:
link - the Link to the Palm device which is associated with the connectionsession - the session in which this service-request takes place
destroy
public void destroy()
throws java.lang.Exception
- Free all resources. This method will be invoked when the SyncHandler is no longer needed. The
SyncHandler should free all the resources it possessed.
This material is Copyrighted (C) 1999 by Tilo Christ. All Rights Reserved.