org.ogf.graap.wsag.server.engine
Class WsagEngine

java.lang.Object
  extended by org.ogf.graap.wsag.server.engine.WsagEngine

public class WsagEngine
extends Object

The WSAGEngine provides access to all agreement factories configured for this engine. The available factories can be retrieved via the agreement factory home interface. The agreement factory home is retrieved by the getAgreementFactoryHome() method. Before the engine can be used it must be initialized. Engine initialization is triggered by the initializeEngine(String) method.

Author:
Oliver Waeldrich

Field Summary
static String WSAG4J_WSRF_ENGINE_FILE_NAME
          Allows to specify an alternate filename for the wsrf-engine configuration via the system properties.
 
Constructor Summary
WsagEngine()
           
 
Method Summary
static IAgreementFactoryHome getAgreementFactoryHome()
          Returns the agreement factory home
static IAgreementHome getAgreementHome()
          Deprecated.  
static String getGatewayURL()
           
static LoginContext getLoginContext()
          Returns the WSAG4J engine login context.
static ConfigurationType getWSAG4JConfiguration()
           
static WsagMessageContext getWsagMessageContext()
          Returns the message context for the current invocation (thread).
static WSRFEngineConfigurationType getWSRFConfiguration()
           
static void initializeEngine(String defaultGatewayURL)
          Initializes the WSAG4J Engine.
static boolean isAllowAnonymousAccess()
          Sets if anonymous access to the server is allowed.
static void setAgreementFactoryHome(IAgreementFactoryHome agreementFactoryHome)
          Overwrites the instance created during initialization.
static void setAgreementHome(IAgreementHome agreementHome)
          Overwrites the instance created during initialization.
static void setAllowAnonymousAccess(boolean allowAnonymousAccess)
          Sets if anonymous access to the server is allowed.
static void setLoginContext(LoginContext context)
          Sets the WSAG4J engine login context.
static void setWsagMessageContext(WsagMessageContext context)
          Sets the message context for the current invocation (thread).
static void shutdownEngine()
          Shutdown of the WSAG4J engine instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WSAG4J_WSRF_ENGINE_FILE_NAME

public static final String WSAG4J_WSRF_ENGINE_FILE_NAME
Allows to specify an alternate filename for the wsrf-engine configuration via the system properties.

See Also:
System.setProperty(String, String), Constant Field Values
Constructor Detail

WsagEngine

public WsagEngine()
Method Detail

getWsagMessageContext

public static WsagMessageContext getWsagMessageContext()
Returns the message context for the current invocation (thread).

Returns:
the message context

setWsagMessageContext

public static void setWsagMessageContext(WsagMessageContext context)
Sets the message context for the current invocation (thread).

Parameters:
context - the message context

initializeEngine

public static void initializeEngine(String defaultGatewayURL)
                             throws Exception
Initializes the WSAG4J Engine. During the initialization process the WSRF engine configuration (system configuration) is parsed and the referenced WSAG4J engine configurations (factory configurations) are loaded. The WSAG4J engine must be initialized before making any calls to the system. By default the WSRF engine configuration location is specified by the WsagConstants.WSAG4J_WSRF_ENGINE_CONFIG_FILE constant. This value can be overwritten by the system property "wsag4j.wsrf-engine.config.filename".

Parameters:
defaultGatewayURL - the default gateway URL
Throws:
Exception - indicates an error during engine initialization

shutdownEngine

public static void shutdownEngine()
                           throws Exception
Shutdown of the WSAG4J engine instance.

Throws:
Exception - indicates an error during engine shutdown

getWSAG4JConfiguration

public static ConfigurationType getWSAG4JConfiguration()
Returns:
the wsag4jConfiguration

getWSRFConfiguration

public static WSRFEngineConfigurationType getWSRFConfiguration()
Returns:
the configuration

getGatewayURL

public static String getGatewayURL()
Returns:
the deploymentAddress

setLoginContext

public static void setLoginContext(LoginContext context)
Sets the WSAG4J engine login context. This login context is used to identify a WSAG4J server instance, e.g. action implementations can use this login context to sign outgoing messages.

Parameters:
context - the login context

getLoginContext

public static LoginContext getLoginContext()
Returns the WSAG4J engine login context. This login context is used to identify a WSAG4J server instance, e.g. action implementations can use this login context to sign outgoing messages.

Returns:
the login context

getAgreementFactoryHome

public static IAgreementFactoryHome getAgreementFactoryHome()
Returns the agreement factory home

Returns:
the agreement factory home

setAgreementFactoryHome

public static void setAgreementFactoryHome(IAgreementFactoryHome agreementFactoryHome)
Overwrites the instance created during initialization. The WS-Layer uses this to deploy the extended WS version.

Parameters:
agreementFactoryHome - the home interface to look up the agreement factories

getAgreementHome

@Deprecated
public static IAgreementHome getAgreementHome()
Deprecated. 

Returns:
the agreement home

setAgreementHome

public static void setAgreementHome(IAgreementHome agreementHome)
Overwrites the instance created during initialization. The WS-Layer uses this to deploy the extended WS version.

Parameters:
agreementHome - the home interface to look up the existing agreements

setAllowAnonymousAccess

public static void setAllowAnonymousAccess(boolean allowAnonymousAccess)
Sets if anonymous access to the server is allowed.

Parameters:
allowAnonymousAccess - the allowAnonymousAccess to set

isAllowAnonymousAccess

public static boolean isAllowAnonymousAccess()
Sets if anonymous access to the server is allowed.

Returns:
the allowAnonymousAccess


Copyright © 2008-2012 Fraunhofer Institute SCAI. All Rights Reserved.