Class IpcStreamHandler

java.lang.Object
jadex.ipc.impl.IpcStreamHandler
All Implemented Interfaces:
jadex.messaging.impl.IIpcService

public class IpcStreamHandler extends Object implements jadex.messaging.impl.IIpcService
  • Constructor Details

    • IpcStreamHandler

      public IpcStreamHandler()
      Creates a new UnixSocketStreamHandler.
  • Method Details

    • setSocketDirectory

      public static final void setSocketDirectory(Path dir)
      Sets the directory for the domain socket IPC. Must be called before any component is started.
      Parameters:
      dir - The file system directory used for IPC.
    • get

      public static final IpcStreamHandler get()
      Gets the singleton instance of the handler.
      Returns:
      Singleton instance of the handler.
    • sendMessage

      public void sendMessage(jadex.core.ComponentIdentifier receiver, ByteBuffer message)
      Sends a message to a component outside the current JVM.
      Specified by:
      sendMessage in interface jadex.messaging.impl.IIpcService
      Parameters:
      receiver - The intended message receiver.
      message - The message.
    • open

      protected void open()
      Opens a socket allowing incoming connections.
    • open

      protected void open(String pidstr)
      Opens a socket allowing incoming connections.
      Parameters:
      pidstr - PID string to use.