org.caleigo.service
Interface IService

All Superinterfaces:
IDistributable, java.io.Serializable
All Known Subinterfaces:
IDataService, ILoginService, IProxyService, ISecureService
All Known Implementing Classes:
AbstractDataService, LoginService, LoginService.LoginProxyService, ServiceProviderServer.MessageConsumer.ProxyService, TunneledDataService

public interface IService
extends java.io.Serializable, IDistributable

The IService interface is the root interface that all service objects must implement. The interface makes it possile to handle services in an abstract and distributet way. The provided service is accessed by the service object that can be accessed from the IService interface.

Note tha if possible all IService implementations should also implement the interface of the specific service they provide. If they do not it should be specially motivated and documented.

Version:
1.00
Author:
Dennis Zikovic

Method Summary
 void finalizeService()
          This method is always called by the ServiceManager before the service is released.
 IProxyService getCustomProxyService(ITunnel tunnel)
          Returns an IProxyService that is responsible for handling remote invokations on this service.
 java.lang.Object getServiceIdentity()
          Returns the URI defining the a unique individual service.
 java.lang.Object getServiceInterface()
          Returns the service object that this service provides.
 java.lang.Class getServiceInterfaceClass()
          Returns the class object the defines the service interface that all services with the same type provides.
 java.lang.Object getServiceType()
          Returns a URI that defines the type of this service.
 boolean hasCustomProxyService()
          If this method returns true then the method getCustomProxyService must not return null.
 void initializeService()
          This method is always called by the ServiceManager before any other method in the service is called.
 boolean ping()
          Should return true if the service is online and reponding to calls.
 

Method Detail

initializeService

public void initializeService()
This method is always called by the ServiceManager before any other method in the service is called.


finalizeService

public void finalizeService()
This method is always called by the ServiceManager before the service is released. No other method calls will then be performed on this instance of the service.


ping

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


getServiceInterface

public java.lang.Object getServiceInterface()
Returns the service object that this service provides. This object should always implement the interface defined by the service interface class.


getServiceInterfaceClass

public java.lang.Class getServiceInterfaceClass()
Returns the class object the defines the service interface that all services with the same type provides.


getServiceType

public java.lang.Object getServiceType()
Returns a URI that defines the type of this service. Note that there can be multiple services implementing the same service type but implementations of a given type must implement the same service interface.


getServiceIdentity

public java.lang.Object getServiceIdentity()
Returns the URI defining the a unique individual service.


hasCustomProxyService

public boolean hasCustomProxyService()
If this method returns true then the method getCustomProxyService must not return null.


getCustomProxyService

public IProxyService getCustomProxyService(ITunnel tunnel)
Returns an IProxyService that is responsible for handling remote invokations on this service.



Copyright © 2005 Caleigo. All Rights Reserved.