Class SWebSocket


  • public class SWebSocket
    extends java.lang.Object
    Static helper methods for Jadex websocket integration.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ATTR_PLATFORM
      Attribute name for platform in context.
    • Constructor Summary

      Constructors 
      Constructor Description
      SWebSocket()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static IFuture<java.lang.Void> cleanupContext​(javax.servlet.ServletContext context)
      Cleanup a context.
      static IFuture<IComponentIdentifier> createAgent​(javax.servlet.ServletContext context, java.lang.String model)
      Create a agent.
      static IFuture<IExternalAccess> getPlatform​(javax.servlet.ServletContext context)
      Get or create a Jadex platform for the given context.
      static IFuture<java.lang.Void> initContext​(javax.servlet.ServletContext context)
      Initialize a context.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ATTR_PLATFORM

        public static final java.lang.String ATTR_PLATFORM
        Attribute name for platform in context.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SWebSocket

        public SWebSocket()
    • Method Detail

      • initContext

        public static IFuture<java.lang.Void> initContext​(javax.servlet.ServletContext context)
        Initialize a context. Should be called only once per context at startup. Creates platform and initial agents, if necessary.
        Parameters:
        context - The servlet context.
      • cleanupContext

        public static IFuture<java.lang.Void> cleanupContext​(javax.servlet.ServletContext context)
        Cleanup a context. Should be called only once per context at shutdown. Removes platform with all agents, if necessary.
        Parameters:
        context - The servlet context.
      • getPlatform

        public static IFuture<IExternalAccess> getPlatform​(javax.servlet.ServletContext context)
        Get or create a Jadex platform for the given context.
        Parameters:
        context - The servlet context.
      • createAgent

        public static IFuture<IComponentIdentifier> createAgent​(javax.servlet.ServletContext context,
                                                                java.lang.String model)
        Create a agent.
        Parameters:
        context - The servlet context.
        model - The agent model.
        Returns:
        Future for the component identifier of the created agent.