obixserver.module.external
Class AbstractExternalModule

java.lang.Object
  extended by obixserver.module.external.AbstractExternalModule
All Implemented Interfaces:
Service, ExternalModule
Direct Known Subclasses:
ExternalNoopModule

public abstract class AbstractExternalModule
extends Object
implements ExternalModule

This is the abstract external module that external modules usually extend. It implements most functionality that is common for all modules.


Field Summary
protected  obix.Obj baseObj
          Base Obj of this module.
private static Logger logger
           
private  String path
          Leaf of the base URL of the module.
protected  Properties properties
          Properties configured during load that can be read during initialization and execution of the module.
protected  obix.net.ObixSession session
          Obix session for this moduel.
 
Constructor Summary
AbstractExternalModule()
           
AbstractExternalModule(String base)
           
 
Method Summary
protected  void createObj(obix.Obj obj)
           
 String getHome()
           
protected  String getProperty(String name)
           
 void init(obix.Obj parent)
          Initialize the module.
 void setBaseObj(obix.Obj obj)
           
 void setHome(String path)
          Sets path for root of the subtree of oBIX server that this external module will be updating.
 void setProperty(String name, String value)
          Sets property for this module.
 void setSession(obix.net.ObixSession session)
           
 void term()
          De-initialize/terminate the module.
protected  void updateObj(obix.Obj obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface obixserver.core.Service
start, stop
 

Field Detail

logger

private static final Logger logger

properties

protected Properties properties
Properties configured during load that can be read during initialization and execution of the module.


session

protected obix.net.ObixSession session
Obix session for this moduel.


baseObj

protected obix.Obj baseObj
Base Obj of this module. All module's Objs are decendents of this Obj.


path

private String path
Leaf of the base URL of the module.

Constructor Detail

AbstractExternalModule

public AbstractExternalModule()

AbstractExternalModule

public AbstractExternalModule(String base)
Method Detail

init

public void init(obix.Obj parent)
Description copied from interface: ExternalModule
Initialize the module. Resource will be allocated, etc.

Specified by:
init in interface ExternalModule

setBaseObj

public void setBaseObj(obix.Obj obj)
Specified by:
setBaseObj in interface ExternalModule

term

public void term()
Description copied from interface: ExternalModule
De-initialize/terminate the module. Resource will be de-allocated, any second phase cleanup that couldn't be done in stop will be done.

Specified by:
term in interface ExternalModule

setProperty

public void setProperty(String name,
                        String value)
Description copied from interface: ExternalModule
Sets property for this module. Property is a short-named replica of property read from configuration file.

Specified by:
setProperty in interface ExternalModule

getProperty

protected String getProperty(String name)

setHome

public void setHome(String path)
Description copied from interface: ExternalModule
Sets path for root of the subtree of oBIX server that this external module will be updating.

Specified by:
setHome in interface ExternalModule

getHome

public String getHome()
Specified by:
getHome in interface ExternalModule

setSession

public void setSession(obix.net.ObixSession session)
Specified by:
setSession in interface ExternalModule

createObj

protected void createObj(obix.Obj obj)

updateObj

protected void updateObj(obix.Obj obj)


Copyright © 2006-2008 Peter Michalek All Rights Reserved.