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 IpcStreamHandlerget()Gets the singleton instance of the handler.protected voidopen()Opens a socket allowing incoming connections.protected voidOpens a socket allowing incoming connections.voidsendMessage(jadex.core.ComponentIdentifier receiver, ByteBuffer message) Sends a message to a component outside the current JVM.static final voidsetSocketDirectory(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:
sendMessagein 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.
-