Package jadex.ipc.impl
Class IpcStreamHandler
java.lang.Object
jadex.ipc.impl.IpcStreamHandler
- All Implemented Interfaces:
jadex.messaging.impl.IIpcService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final IpcStreamHandler
get()
Gets the singleton instance of the handler.protected void
open()
Opens a socket allowing incoming connections.protected void
Opens a socket allowing incoming connections.void
sendMessage
(jadex.core.ComponentIdentifier receiver, ByteBuffer message) Sends a message to a component outside the current JVM.static final void
setSocketDirectory
(Path dir) Sets the directory for the domain socket IPC.
-
Constructor Details
-
IpcStreamHandler
public IpcStreamHandler()Creates a new UnixSocketStreamHandler.
-
-
Method Details
-
setSocketDirectory
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
Gets the singleton instance of the handler.- Returns:
- Singleton instance of the handler.
-
sendMessage
Sends a message to a component outside the current JVM.- Specified by:
sendMessage
in interfacejadex.messaging.impl.IIpcService
- Parameters:
receiver
- The intended message receiver.message
- The message.
-
open
protected void open()Opens a socket allowing incoming connections. -
open
Opens a socket allowing incoming connections.- Parameters:
pidstr
- PID string to use.
-