org.gcube.messaging.common.consumer
Class ServiceContext

java.lang.Object
  extended by GCUBEServiceContext
      extended by org.gcube.messaging.common.consumer.ServiceContext

public class ServiceContext
extends GCUBEServiceContext

The service context

Author:
Andrea Manzi(CERN)

Method Summary
 boolean connectToUsermanagementDB()
          check if the consumer is configured to connect to usermanagement ws
 AccountingDBManager getAccountingManager()
          get the accountingManager manager
 AccountingSystemDBManager getAccountingSystemManager()
          get the Accounting System Manager
static ServiceContext getContext()
          Returns the single context instance.
 java.lang.String getDbhost()
           
 java.lang.String getDbpass()
          get the DB pass value
 java.lang.Long getDbport()
           
 java.lang.String getDbuser()
          Set the value of the property DB user
 int getHttpServerPort()
          ger web server port
 java.lang.String getJNDIName()
          
 MailClient getMailClient()
          get the mail client
 MailTemplateParser getMailTemplateParser()
          The mail template parser
 java.lang.Long getMaxDBConnections()
           
 java.util.HashMap<GCUBEScope,java.util.HashMap<java.lang.Class<? extends GCUBEMessage>,MessageChecker<?>>> getMessageCheckerMap()
          get the Message checker map
 MonitoringDBManager getMonitoringManager()
          get the MonitoringDB manager
 Notifier getNotifier()
          get the notifier
 java.lang.Boolean getNotifyByMail()
          get the notify by mail parameter value
 WebServer getServer()
          get the Web server
static java.util.ArrayList<BrokerSubscription<?>> getSubscriptionsList()
          get the list of subscriptions
 java.lang.Boolean getUseEmbeddedBroker()
          get the embedded broker parameter
 java.lang.Boolean getUseEmbeddedDB()
          get the value of property UseEmbeddedDB
 void setAccountingManager(AccountingDBManager manager)
          set the accountingManager manager
 void setAccountingSystemManager(AccountingSystemDBManager accountingSystemManager)
          Set the Accounting System Manager
 void setDbhost(java.lang.String dbhost)
           
 void setDbpass(java.lang.String dbpass)
          Set the DB pass value
 void setDbport(java.lang.Long dbport)
           
 void setDbuser(java.lang.String dbuser)
          set the DBuser value
 void setHttpServerPort(int httpServerPort)
          set teh web server port
 void setMailClient(MailClient mailClient)
          set the mail client
 void setMailTemplateParser(MailTemplateParser mailTemplateParser)
          set the mail template parser
 void setMaxDBConnections(java.lang.Long maxDBConnections)
           
 void setMessageCheckerMap(java.util.HashMap<GCUBEScope,java.util.HashMap<java.lang.Class<? extends GCUBEMessage>,MessageChecker<?>>> messageCheckerMap)
          set the message checker map
 void setMonitoringManager(MonitoringDBManager manager)
          set the MonitoringDB manager
 void setNotifier(Notifier notifier)
          set the notifier
 void setNotifyByMail(java.lang.Boolean notifyByMail)
          set the notify by mail parameter value
 void setServer(WebServer server)
          ser the Web Server
static void setSubscriptionsList(java.util.ArrayList<BrokerSubscription<?>> subscriptionsList)
          set the array of broker subscriptions
 void setUseEmbeddedBroker(java.lang.Boolean useEmbeddedBroker)
          set the use embedded broker
 void setUseEmbeddedDB(java.lang.Boolean useEmbeddedDB)
          set the value of property UseEmbeddedDB
 void stopDurableSubscriber()
          Close Subscription to broker
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContext

public static ServiceContext getContext()
Returns the single context instance.

Returns:
the instance.

getNotifier

public Notifier getNotifier()
get the notifier

Returns:
the notifier

setNotifier

public void setNotifier(Notifier notifier)
set the notifier

Parameters:
notifier - the notifier

getMonitoringManager

public MonitoringDBManager getMonitoringManager()
get the MonitoringDB manager

Returns:
the MonitoringDB manager

setMonitoringManager

public void setMonitoringManager(MonitoringDBManager manager)
set the MonitoringDB manager

Parameters:
manager - the DB manager

getAccountingManager

public AccountingDBManager getAccountingManager()
get the accountingManager manager

Returns:
the accountingManager manager

setAccountingManager

public void setAccountingManager(AccountingDBManager manager)
set the accountingManager manager

Parameters:
manager - the accountingManager manager

getAccountingSystemManager

public AccountingSystemDBManager getAccountingSystemManager()
get the Accounting System Manager

Returns:
the Accounting System Manager

setAccountingSystemManager

public void setAccountingSystemManager(AccountingSystemDBManager accountingSystemManager)
Set the Accounting System Manager

Parameters:
accountingSystemManager - manager

getNotifyByMail

public java.lang.Boolean getNotifyByMail()
get the notify by mail parameter value

Returns:
notify by mail parameter value

setNotifyByMail

public void setNotifyByMail(java.lang.Boolean notifyByMail)
set the notify by mail parameter value

Parameters:
notifyByMail - get the notify by mail parameter value

getJNDIName

public java.lang.String getJNDIName()


getMessageCheckerMap

public java.util.HashMap<GCUBEScope,java.util.HashMap<java.lang.Class<? extends GCUBEMessage>,MessageChecker<?>>> getMessageCheckerMap()
get the Message checker map

Returns:
the Message checker map

setMessageCheckerMap

public void setMessageCheckerMap(java.util.HashMap<GCUBEScope,java.util.HashMap<java.lang.Class<? extends GCUBEMessage>,MessageChecker<?>>> messageCheckerMap)
set the message checker map

Parameters:
messageCheckerMap -

getMailClient

public MailClient getMailClient()
get the mail client

Returns:
the mail client

setMailClient

public void setMailClient(MailClient mailClient)
set the mail client

Parameters:
mailClient - the mail client

getUseEmbeddedBroker

public java.lang.Boolean getUseEmbeddedBroker()
get the embedded broker parameter

Returns:
the broker parameter

setUseEmbeddedBroker

public void setUseEmbeddedBroker(java.lang.Boolean useEmbeddedBroker)
set the use embedded broker

Parameters:
useEmbeddedBroker - use embedded broker

getServer

public WebServer getServer()
get the Web server

Returns:
the Web server

setServer

public void setServer(WebServer server)
ser the Web Server

Parameters:
server - the wewb server

getHttpServerPort

public int getHttpServerPort()
ger web server port

Returns:
the web server port

setHttpServerPort

public void setHttpServerPort(int httpServerPort)
set teh web server port

Parameters:
httpServerPort - the web server port

stopDurableSubscriber

public void stopDurableSubscriber()
Close Subscription to broker

Throws:
JMSException

getSubscriptionsList

public static java.util.ArrayList<BrokerSubscription<?>> getSubscriptionsList()
get the list of subscriptions

Returns:
list of subscriptions

setSubscriptionsList

public static void setSubscriptionsList(java.util.ArrayList<BrokerSubscription<?>> subscriptionsList)
set the array of broker subscriptions

Parameters:
subscriptionsList - the subscription list

getUseEmbeddedDB

public java.lang.Boolean getUseEmbeddedDB()
get the value of property UseEmbeddedDB

Returns:
the value of the property

setUseEmbeddedDB

public void setUseEmbeddedDB(java.lang.Boolean useEmbeddedDB)
set the value of property UseEmbeddedDB

Parameters:
useEmbeddedDB - the value to set

getDbuser

public java.lang.String getDbuser()
Set the value of the property DB user

Returns:
the dbUSer value

setDbuser

public void setDbuser(java.lang.String dbuser)
set the DBuser value

Parameters:
dbuser - DB user

getDbpass

public java.lang.String getDbpass()
get the DB pass value

Returns:
the DB pass

setDbpass

public void setDbpass(java.lang.String dbpass)
Set the DB pass value

Parameters:
dbpass - the DB pass

getMailTemplateParser

public MailTemplateParser getMailTemplateParser()
The mail template parser

Returns:
the mail template parser

setMailTemplateParser

public void setMailTemplateParser(MailTemplateParser mailTemplateParser)
set the mail template parser

Parameters:
mailTemplateParser - the mail template parser

connectToUsermanagementDB

public boolean connectToUsermanagementDB()
check if the consumer is configured to connect to usermanagement ws

Returns:
true false

getDbhost

public java.lang.String getDbhost()

setDbhost

public void setDbhost(java.lang.String dbhost)

getDbport

public java.lang.Long getDbport()

setDbport

public void setDbport(java.lang.Long dbport)

getMaxDBConnections

public java.lang.Long getMaxDBConnections()

setMaxDBConnections

public void setMaxDBConnections(java.lang.Long maxDBConnections)