Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.flexdbserver.services
Class ServiceContext  view ServiceContext download ServiceContext.java

java.lang.Object
  extended bycom.flexstor.flexdbserver.services.ServiceContext

public class ServiceContext
extends java.lang.Object

Object passed to each service instance containing information about the environment in which the service is running. It contains methods to access the properties defined in the services.config, *.ctl or roletype_services.config files for the service.


Field Summary
private  java.lang.String fileSeparator
           
private  int nTransId
          This is the transaction id that should be set in initData() The transaction id gives a reference for logging transactions.
private  java.util.Hashtable propertyMap
           
private  java.lang.String sConfigPath
          The Flexstor.DB config path
private  com.flexstor.common.services.ServiceBrokerI serviceBroker
          An instance of the Service Broker needed by all services
private  java.lang.String sInstallPath
          The Flexstor.DB installation path
private  java.lang.String sServiceName
          The name of the service
 
Constructor Summary
(package private) ServiceContext(java.lang.String serviceName, java.util.Hashtable map)
           
 
Method Summary
(package private)  void addProperties(java.util.Hashtable htProp)
           
(package private)  void addProperty(java.lang.String property, java.lang.String value)
           
 java.lang.String getConfigPath()
           
 java.lang.String getFileSeparator()
           
 java.lang.String getInstallPath()
           
 java.util.Hashtable getProperties()
           
 java.lang.String getProperty(java.lang.String property)
           
 com.flexstor.common.services.ServiceBrokerI getServiceBroker()
           
 java.lang.String getServiceName()
           
 int getTransactionId()
           
private  void setDefaultForProperty(java.lang.String sProperty, java.lang.String sDefault)
           
(package private)  void setProperties(java.util.Hashtable map)
           
 void setTransactionId(int nTransId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nTransId

private int nTransId
This is the transaction id that should be set in initData() The transaction id gives a reference for logging transactions.


sServiceName

private java.lang.String sServiceName
The name of the service


serviceBroker

private com.flexstor.common.services.ServiceBrokerI serviceBroker
An instance of the Service Broker needed by all services


sInstallPath

private java.lang.String sInstallPath
The Flexstor.DB installation path


sConfigPath

private java.lang.String sConfigPath
The Flexstor.DB config path


fileSeparator

private java.lang.String fileSeparator

propertyMap

private java.util.Hashtable propertyMap
Constructor Detail

ServiceContext

ServiceContext(java.lang.String serviceName,
               java.util.Hashtable map)
Method Detail

setTransactionId

public void setTransactionId(int nTransId)

getServiceBroker

public com.flexstor.common.services.ServiceBrokerI getServiceBroker()

getTransactionId

public int getTransactionId()

getInstallPath

public java.lang.String getInstallPath()

getConfigPath

public java.lang.String getConfigPath()

getFileSeparator

public java.lang.String getFileSeparator()

getProperty

public java.lang.String getProperty(java.lang.String property)

getProperties

public java.util.Hashtable getProperties()

getServiceName

public java.lang.String getServiceName()

setProperties

void setProperties(java.util.Hashtable map)

addProperties

void addProperties(java.util.Hashtable htProp)

addProperty

void addProperty(java.lang.String property,
                 java.lang.String value)

setDefaultForProperty

private void setDefaultForProperty(java.lang.String sProperty,
                                   java.lang.String sDefault)