org.sapia.soto
Class ServiceMetaData

java.lang.Object
  extended by org.sapia.soto.ServiceMetaData

public class ServiceMetaData
extends Object

Holds meta information about a given service.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software . All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
See Also:
Service

Constructor Summary
ServiceMetaData(String id, Object service)
           
ServiceMetaData(String id, Object service, List layers)
           
 
Method Summary
 void addAttribute(Attribute attr)
           
 Attribute getAttribute(String name)
           
 Collection getAttributes()
           
 Object getService()
          Returns this instance's associated service.
 String getServiceID()
          Returns the identifier of the service to which this instance corresponds.
 void init()
          Calls the init() method of this instance's service.
 boolean isInit()
           
 boolean isStarted()
           
 void setDisposeMethod(MethodConfig dispose)
           
 void setInitMethod(MethodConfig init)
           
 void setService(Object obj)
          Sets this instance's service.
 void setStartMethod(MethodConfig start)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceMetaData

public ServiceMetaData(String id,
                       Object service)

ServiceMetaData

public ServiceMetaData(String id,
                       Object service,
                       List layers)
Method Detail

getServiceID

public String getServiceID()
Returns the identifier of the service to which this instance corresponds.

Returns:
a service identifier, or null if the service to which this instance corresponds is an "anonymous" service (it has no ID).

setService

public void setService(Object obj)
Sets this instance's service.

WARNING : in general, this method should not be called by client applications.

Parameters:
obj - a service instance.
See Also:
Service

getService

public Object getService()
Returns this instance's associated service.

Returns:
a service.

getAttributes

public Collection getAttributes()
Returns:
the Collection of Attribute of this instance.

getAttribute

public Attribute getAttribute(String name)
Parameters:
name - the name of the desired attribute.
Returns:
the Attribute corresponding to the given name, or Null if no such attribute exists.

addAttribute

public void addAttribute(Attribute attr)
Parameters:
attr - an Attribute.

isInit

public boolean isInit()
Returns:
true if the service corresponding to this instance has had its init() method called.

isStarted

public boolean isStarted()
Returns:
true if the service corresponding to this instance has had its start() method called.

init

public void init()
          throws Exception
Calls the init() method of this instance's service.

Throws:
Exception - if a problem occurs performing this instance's service initialization.

setInitMethod

public void setInitMethod(MethodConfig init)

setStartMethod

public void setStartMethod(MethodConfig start)

setDisposeMethod

public void setDisposeMethod(MethodConfig dispose)


Copyright © 2002-2007 Sapia Open Community, Inc. All Rights Reserved.