Changeset 3331

Show
Ignore:
Timestamp:
01/30/10 13:19:55 (6 weeks ago)
Author:
trichards
Message:

Added scriptable_generic_service implementation.

Location:
Enterprise/branches/0075_TR_SCRIPTING/AppServer
Files:
1 added
5 modified

Legend:

Unmodified
Added
Removed
  • Enterprise/branches/0075_TR_SCRIPTING/AppServer/I_ApplicationServer.hpp

    r3311 r3331  
    108108    virtual void registerDefaultScriptEngine(pScriptEngine_type _pEngine) = 0; 
    109109 
     110    /// Get the default script engine. 
     111    virtual pScriptEngine_type getDefaultScriptEngine() = 0; 
     112 
    110113    /// Install multiple protocol services using the provided configuration. 
    111114    /// The provided configuration should have zero or more <protocol/> entries which 
  • Enterprise/branches/0075_TR_SCRIPTING/AppServer/I_Request.hpp

    r878 r3331  
    5050    /// @{ 
    5151public: 
     52    virtual unsigned int getRequestId() const = 0; 
    5253    /// @} 
    5354 
  • Enterprise/branches/0075_TR_SCRIPTING/AppServer/I_Response.hpp

    r1493 r3331  
    5050    /// @{ 
    5151public: 
     52    /// Get the message Id associated with the request 
     53    virtual unsigned int getRequestMessageId() const = 0; 
    5254    /// @} 
    5355 
  • Enterprise/branches/0075_TR_SCRIPTING/AppServer/src/ApplicationServer.cpp

    r3246 r3331  
    4949#include <Zen/Core/Scripting/I_ScriptableService.hpp> 
    5050 
     51#include <Zen/Enterprise/Networking/I_Endpoint.hpp> 
     52#include <Zen/Enterprise/Networking/I_Address.hpp> 
     53 
    5154//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
    5255namespace Zen { 
     
    270273 
    271274    m_pScriptEngine = _pEngine; 
     275} 
     276 
     277//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
     278ApplicationServer::pScriptEngine_type 
     279ApplicationServer::getDefaultScriptEngine() 
     280{ 
     281    return m_pScriptEngine; 
    272282} 
    273283 
     
    743753    ResourceLocation* pDestination = dynamic_cast<ResourceLocation*>(_pRequest->getDestinationLocation().get()); 
    744754 
     755    // TODO: If _pRequest destination is not this server then the request is destined for 
     756    // another destination and it should be sent instead of dispatched. 
     757    std::cout << "Sending a request to "  
     758        << _pRequest->getDestinationEndpoint()->getAddress().toString()  
     759        << "/" 
     760        << pDestination->toString() 
     761        << std::endl; 
     762 
    745763    if (pDestination != NULL) 
    746764    { 
  • Enterprise/branches/0075_TR_SCRIPTING/AppServer/src/ApplicationServer.hpp

    r3246 r3331  
    7373    virtual void stop(); 
    7474    virtual void registerDefaultScriptEngine(pScriptEngine_type _pEngine); 
     75    virtual pScriptEngine_type getDefaultScriptEngine(); 
    7576    virtual void installProtocols(pConfig_type _pProtocolsConfig); 
    7677    virtual void installProtocol(pProtocolService_type _pProtocolService, const std::string& _protocolName);