org.caleigo.core
Class TunneledDataService

java.lang.Object
  extended byorg.caleigo.core.AbstractDataService
      extended byorg.caleigo.core.TunneledDataService
All Implemented Interfaces:
IDataService, IDistributable, IProxyService, ISecureService, IService, java.io.Serializable

public class TunneledDataService
extends AbstractDataService
implements IProxyService

Version:
1.00
Author:
Mattias Hagstrand
See Also:
Serialized Form

Nested Class Summary
protected static class TunneledDataService.TunneledDataServiceAbortTransactionMessage
           
protected static class TunneledDataService.TunneledDataServiceCommitMessage
           
protected static class TunneledDataService.TunneledDataServiceMessage
           
protected static class TunneledDataService.TunneledDataServiceProgressMessage
           
protected static class TunneledDataService.TunneledDataServiceReturnMessage
           
protected static class TunneledDataService.TunneledDataTransaction
           
 
Nested classes inherited from class org.caleigo.core.AbstractDataService
AbstractDataService.AbstractDataTransaction
 
Field Summary
protected  ITunnel mTunnel
           
 
Fields inherited from class org.caleigo.core.AbstractDataService
DEFAULT_TIMEOUT
 
Constructor Summary
TunneledDataService(java.lang.Object serviceType, java.lang.Object serviceIdentity, IDataSourceDescriptor dataSourceDescriptor, ITunnel tunnel)
           
 
Method Summary
 boolean isReconnectable()
          Returns true if this IProxyService can be reconnected to an IService.
 IDataTransaction newTransaction()
          Returns a new IDataTransaction object that can be used to batch data operations and wrap them in a transaction.
 boolean ping()
          Should return true if the service is online and reponding to calls.
 void reconnect(ITunnel tunnel)
          Tries to reconnect to the provided service.
 void setServiceTunnel(ITunnel tunnel)
          Sets the ITunnel that should be used by this IProxyService.
 
Methods inherited from class org.caleigo.core.AbstractDataService
checkEntityAsDeletable, checkEntityAsStorable, delete, finalizeService, getCustomProxyService, getDataSourceDescriptor, getServiceIdentity, getServiceInterface, getServiceInterfaceClass, getServiceType, getTimeout, hasCustomProxyService, initializeService, isValidating, load, loadSelection, loadSelection, refresh, setEntityData, setTimeout, setValidating, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.caleigo.service.IService
finalizeService, getCustomProxyService, getServiceIdentity, getServiceInterface, getServiceInterfaceClass, getServiceType, hasCustomProxyService, initializeService
 

Field Detail

mTunnel

protected transient ITunnel mTunnel
Constructor Detail

TunneledDataService

public TunneledDataService(java.lang.Object serviceType,
                           java.lang.Object serviceIdentity,
                           IDataSourceDescriptor dataSourceDescriptor,
                           ITunnel tunnel)
Method Detail

isReconnectable

public boolean isReconnectable()
Returns true if this IProxyService can be reconnected to an IService.

Specified by:
isReconnectable in interface IProxyService

reconnect

public void reconnect(ITunnel tunnel)
               throws ServiceException
Tries to reconnect to the provided service. If the reconnection fails or if this IProxyService doesn't support reconnection an exception is thrown.

Specified by:
reconnect in interface IProxyService
Throws:
ServiceException

setServiceTunnel

public void setServiceTunnel(ITunnel tunnel)
Sets the ITunnel that should be used by this IProxyService.

Specified by:
setServiceTunnel in interface IProxyService

newTransaction

public IDataTransaction newTransaction()
Description copied from interface: IDataService
Returns a new IDataTransaction object that can be used to batch data operations and wrap them in a transaction.

Specified by:
newTransaction in interface IDataService
Specified by:
newTransaction in class AbstractDataService

ping

public boolean ping()
Description copied from interface: IService
Should return true if the service is online and reponding to calls. Note that initializeService() must be called prior to this method.

Specified by:
ping in interface IService
Specified by:
ping in class AbstractDataService


Copyright © 2005 Caleigo. All Rights Reserved.