Visit Platform at http://www.platform.com

Platform Symphony 4.1 Java API Reference

com.platform.symphony.soam
Interface ServiceContext


public interface ServiceContext

Provides functionality that the service will require throughout its lifetime. This object will be passed to a service instance when it is created. The service instance may choose to cache a reference to this object and call on it at anytime it requires.

See Also:
ServiceContainer.onCreateService(com.platform.symphony.soam.ServiceContext)

Method Summary
 java.lang.String getApplicationName()
          Gets the name of the application.
 java.lang.String getConsumerId()
          Gets the consumer ID.
 java.lang.String getDeployDirectory()
          Gets the deployment directory.
 InterruptEvent getLastInterruptEvent()
          Gets the current interrupt event.
 java.lang.String getLogDirectory()
          Gets the log directory.
 java.lang.String getServiceName()
          Gets the service name.
 void setControlCode(int code)
          Sets a service control code for service instance manager.
 

Method Detail

getServiceName

java.lang.String getServiceName()
                                throws SoamException
Gets the service name.

Returns:
The service name
Throws:
SoamException

getLastInterruptEvent

InterruptEvent getLastInterruptEvent()
                                     throws SoamException
Gets the current interrupt event. After detecting an interrupt event, it is up the developer to decide what the best course of action is.

Returns:
The interrupt event
Throws:
SoamException
See Also:
InterruptEvent

setControlCode

void setControlCode(int code)
                    throws SoamException
Sets a service control code for service instance manager.

Parameters:
code - The control code defined in the Application Profile
Throws:
SoamException

getApplicationName

java.lang.String getApplicationName()
                                    throws SoamException
Gets the name of the application.

Returns:
The application name associated with this service instance.
Throws:
SoamException

getConsumerId

java.lang.String getConsumerId()
                               throws SoamException
Gets the consumer ID.

Returns:
The consumer ID associated with the application.
Throws:
SoamException

getDeployDirectory

java.lang.String getDeployDirectory()
                                    throws SoamException
Gets the deployment directory.

Returns:
The deployment directory associated with this service.
Throws:
SoamException

getLogDirectory

java.lang.String getLogDirectory()
                                 throws SoamException
Gets the log directory.

Note: If no log directory was configured in the application profile, this method will return "${SOAM_HOME}/work".

Returns:
The log directory configured for this application.
Throws:
SoamException

Version 4.1
Date Modified: -DREL_DATE=Nov 03 2008
Platform Computing. Accelerating Intelligence(TM).
Copyright (C) 2001-2008 Platform Computing Corporation. All rights reserved.