ServiceContext (consumer-service 1.9.2-3.5.0 API)
Date: 2014-11-12

org.gcube.messaging.common.consumer

## Class ServiceContext

- java.lang.Object
- - org.gcube.common.core.contexts.GCUBEContext
  - - org.gcube.common.core.contexts.GCUBEServiceContext
    - - org.gcube.messaging.common.consumer.ServiceContext

- All Implemented Interfaces:
    org.gcube.common.core.scope.GCUBEScopeManager, org.gcube.common.core.security.GCUBESecurityManager, org.gcube.common.core.security.GCUBEServiceSecurityManager

      public class ServiceContext
      extends org.gcube.common.core.contexts.GCUBEServiceContext

  The service context
  Author:
    Andrea Manzi(CERN)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.gcube.common.core.contexts.GCUBEServiceContext

      `org.gcube.common.core.contexts.GCUBEServiceContext.IllegalStateTransitionException, org.gcube.common.core.contexts.GCUBEServiceContext.RILifetimeEvent, org.gcube.common.core.contexts.GCUBEServiceContext.RILifetimeTopic, org.gcube.common.core.contexts.GCUBEServiceContext.ServiceSecurityStatus, org.gcube.common.core.contexts.GCUBEServiceContext.Stager, org.gcube.common.core.contexts.GCUBEServiceContext.StateTransitionException, org.gcube.common.core.contexts.GCUBEServiceContext.Status`

    - ### Nested classes/interfaces inherited from interface org.gcube.common.core.security.GCUBEServiceSecurityManager

      `org.gcube.common.core.security.GCUBEServiceSecurityManager.LifetimeConsumer, org.gcube.common.core.security.GCUBEServiceSecurityManager.LifetimeEvent, org.gcube.common.core.security.GCUBEServiceSecurityManager.LifetimeTopic`

    - ### Nested classes/interfaces inherited from interface org.gcube.common.core.security.GCUBESecurityManager

      `org.gcube.common.core.security.GCUBESecurityManager.AuthMethod, org.gcube.common.core.security.GCUBESecurityManager.AuthMode, org.gcube.common.core.security.GCUBESecurityManager.DelegationMode`

    - ### Nested classes/interfaces inherited from interface org.gcube.common.core.scope.GCUBEScopeManager

      `org.gcube.common.core.scope.GCUBEScopeManager.IllegalScopeException`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static ServiceContext` | `cache`

    - ### Fields inherited from class org.gcube.common.core.contexts.GCUBEServiceContext

      `AUTHENTICATION_MANAGER_JNDI_NAME, AUTHORISATION_MANAGER_JNDI_NAME, CONFIG_DIR_JNDI_NAME, LISTENER_UPDATE_INTERVAL, LTEventProducer, PERSISTENCE_MANAGER_JNDI_NAME, PLUGIN_MANAGER_JNDI_NAME, PROFILE_FILE_NAME, PROPAGATE_CALLER_CREDENTIALS_JNDI_NAME, PUBLISHED_HOST_JNDI_NAME, PUBLISHED_PORT_JNDI_NAME, RIPROFILE_FILENAME, SECURITY_MANAGER_JNDI_NAME, START_SCOPES_JNDI_NAME`

    - ### Fields inherited from class org.gcube.common.core.contexts.GCUBEContext

      `timers`

    - ### Fields inherited from interface org.gcube.common.core.scope.GCUBEScopeManager

      `CLASS_HEADER_NAME, DEFAULT, NAME_HEADER_NAME, SCOPE_HEADER_NAME, SCOPE_NS`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `String` | `getDbhost()`
    `String` | `getDbpass()` get the DB pass value
    `Long` | `getDbport()`
    `String` | `getDbuser()` Set the value of the property DB user
    `Long` | `getEdnpointWaitingTime()`
    `Long` | `getEndpointRefreshTime()`
    `int` | `getHttpServerPort()` ger web server port
    `String` | `getJNDIName()`
    `MailClient` | `getMailClient()` get the mail client
    `MailTemplateParser` | `getMailTemplateParser()` The mail template parser
    `Long` | `getMaxDBConnections()`
    `HashMap<org.gcube.common.core.scope.GCUBEScope,HashMap<Class<? extends org.gcube.messaging.common.messages.GCUBEMessage>,MessageChecker<?>>>` | `getMessageCheckerMap()` get the Message checker map
    `MonitoringDBManager` | `getMonitoringManager()` get the MonitoringDB manager
    `Notifier` | `getNotifier()` get the notifier
    `Boolean` | `getNotifyByMail()` get the notify by mail parameter value
    `WebServer` | `getServer()` get the Web server
    `static ArrayList<BrokerSubscription<?>>` | `getSubscriptionsList()` get the list of subscriptions
    `Boolean` | `getUseEmbeddedBroker()` get the embedded broker parameter
    `Boolean` | `getUseEmbeddedDB()` get the value of property UseEmbeddedDB
    `protected void` | `onInitialisation()`
    `protected void` | `onReady()`
    `protected void` | `onShutdown()`
    `void` | `setAccountingManager(AccountingDBManager manager)` set the accountingManager manager
    `void` | `setAccountingSystemManager(AccountingSystemDBManager accountingSystemManager)` Set the Accounting System Manager
    `void` | `setDbhost(String dbhost)`
    `void` | `setDbpass(String dbpass)` Set the DB pass value
    `void` | `setDbport(Long dbport)`
    `void` | `setDbuser(String dbuser)` set the DBuser value
    `void` | `setEdnpointWaitingTime(Long ednpointWaitingTime)`
    `void` | `setEndpointRefreshTime(Long endpointRefreshTime)`
    `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(Long maxDBConnections)`
    `void` | `setMessageCheckerMap(HashMap<org.gcube.common.core.scope.GCUBEScope,HashMap<Class<? extends org.gcube.messaging.common.messages.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(Boolean notifyByMail)` set the notify by mail parameter value
    `void` | `setServer(WebServer server)` ser the Web Server
    `static void` | `setSubscriptionsList(ArrayList<BrokerSubscription<?>> subscriptionsList)` set the array of broker subscriptions
    `void` | `setUseEmbeddedBroker(Boolean useEmbeddedBroker)` set the use embedded broker
    `void` | `setUseEmbeddedDB(Boolean useEmbeddedDB)` set the value of property UseEmbeddedDB
    `void` | `stopDurableSubscriber()` Close Subscription to broker

    - ### Methods inherited from class org.gcube.common.core.contexts.GCUBEServiceContext

      `addScope, getAuthenticationManager, getAuthorizationManager, getCallerCredentials, getCredentials, getDefaultException, getDefaultException, getFile, getID, getInstance, getLogger, getManagementBean, getName, getPersistenceRoot, getPersistentFile, getPluginManager, getPolicy, getProperty, getScope, getScopeManager, getSecurityManager, getService, getServiceClass, getServiceCredentials, getServiceSecurityStatus, getStartScopes, getStatus, initialise, isSecurityEnabled, needServiceCredentials, notifyStateChange, onFailure, onStateChange, onUpdate, prepareCall, propagateCallerCredentials, removeScope, setAuthMethod, setScope, setScope, setScope, setSecurity, setStatus, subscribe, subscribeLifetTime, unsubscribe, unsubscribeLifetTime, useCallerCredentials, useCredentials, useCredentials, useCredentials, useServiceCredentials`

    - ### Methods inherited from class org.gcube.common.core.contexts.GCUBEContext

      `debugContext, getJNDIContext, getResource, getTiming, printContext, resetTimer, setJNDIContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cache

          protected static ServiceContext cache

  - ### 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

    - #### getEdnpointWaitingTime

          public Long getEdnpointWaitingTime()

    - #### setEdnpointWaitingTime

          public void setEdnpointWaitingTime(Long ednpointWaitingTime)

    - #### getEndpointRefreshTime

          public Long getEndpointRefreshTime()

    - #### setEndpointRefreshTime

          public void setEndpointRefreshTime(Long endpointRefreshTime)

    - #### getNotifyByMail

          public Boolean getNotifyByMail()

      get the notify by mail parameter value
      Returns:
        notify by mail parameter value

    - #### setNotifyByMail

          public void setNotifyByMail(Boolean notifyByMail)

      set the notify by mail parameter value
      Parameters:
        `notifyByMail` - get the notify by mail parameter value

    - #### getJNDIName

          public String getJNDIName()

      Specified by:
        `getJNDIName` in class `org.gcube.common.core.contexts.GCUBEServiceContext`

    - #### getMessageCheckerMap

          public HashMap<org.gcube.common.core.scope.GCUBEScope,HashMap<Class<? extends org.gcube.messaging.common.messages.GCUBEMessage>,MessageChecker<?>>> getMessageCheckerMap()

      get the Message checker map
      Returns:
        the Message checker map

    - #### setMessageCheckerMap

          public void setMessageCheckerMap(HashMap<org.gcube.common.core.scope.GCUBEScope,HashMap<Class<? extends org.gcube.messaging.common.messages.GCUBEMessage>,MessageChecker<?>>> messageCheckerMap)

      set the message checker map
      Parameters:
        `messageCheckerMap` -

    - #### onInitialisation

          protected void onInitialisation()
                                   throws Exception

      Overrides:
        `onInitialisation` in class `org.gcube.common.core.contexts.GCUBEServiceContext`
      Throws:
        `Exception`

    - #### onReady

          protected void onReady()
                          throws Exception

      Overrides:
        `onReady` in class `org.gcube.common.core.contexts.GCUBEServiceContext`
      Throws:
        `Exception`

    - #### onShutdown

          protected void onShutdown()
                             throws Exception

      Overrides:
        `onShutdown` in class `org.gcube.common.core.contexts.GCUBEServiceContext`
      Throws:
        `Exception`

    - #### 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 Boolean getUseEmbeddedBroker()

      get the embedded broker parameter
      Returns:
        the broker parameter

    - #### setUseEmbeddedBroker

          public void setUseEmbeddedBroker(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:
        `javax.jms.JMSException`

    - #### getSubscriptionsList

          public static ArrayList<BrokerSubscription<?>> getSubscriptionsList()

      get the list of subscriptions
      Returns:
        list of subscriptions

    - #### setSubscriptionsList

          public static void setSubscriptionsList(ArrayList<BrokerSubscription<?>> subscriptionsList)

      set the array of broker subscriptions
      Parameters:
        `subscriptionsList` - the subscription list

    - #### getUseEmbeddedDB

          public Boolean getUseEmbeddedDB()

      get the value of property UseEmbeddedDB
      Returns:
        the value of the property

    - #### setUseEmbeddedDB

          public void setUseEmbeddedDB(Boolean useEmbeddedDB)

      set the value of property UseEmbeddedDB
      Parameters:
        `useEmbeddedDB` - the value to set

    - #### getDbuser

          public String getDbuser()

      Set the value of the property DB user
      Returns:
        the dbUSer value

    - #### setDbuser

          public void setDbuser(String dbuser)

      set the DBuser value
      Parameters:
        `dbuser` - DB user

    - #### getDbpass

          public String getDbpass()

      get the DB pass value
      Returns:
        the DB pass

    - #### setDbpass

          public void setDbpass(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 String getDbhost()

    - #### setDbhost

          public void setDbhost(String dbhost)

    - #### getDbport

          public Long getDbport()

    - #### setDbport

          public void setDbport(Long dbport)

    - #### getMaxDBConnections

          public Long getMaxDBConnections()

    - #### setMaxDBConnections

          public void setMaxDBConnections(Long maxDBConnections)

Copyright © 2014. All Rights Reserved.