Package org.zeromq
Class ZProxy.ZPump
- java.lang.Object
-
- org.zeromq.ZProxy.ZPump
-
- All Implemented Interfaces:
ZProxy.Pump
- Enclosing class:
- ZProxy
public static class ZProxy.ZPump extends java.lang.Object implements ZProxy.Pump
A pump that reads a message as a whole before transmitting it. It offers a way to transform messages for capture and destination.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classZProxy.ZPump.Identitystatic interfaceZProxy.ZPump.Transformer
-
Field Summary
Fields Modifier and Type Field Description private static ZProxy.ZPump.IdentityIDENTITYprivate ZProxy.ZPump.Transformertransformer
-
Constructor Summary
Constructors Constructor Description ZPump()ZPump(ZProxy.ZPump.Transformer transformer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanflow(ZProxy.Plug splug, ZMQ.Socket source, ZMQ.Socket capture, ZProxy.Plug dplug, ZMQ.Socket destination)Transfers a message from one source to one destination, with an optional capture.
-
-
-
Field Detail
-
IDENTITY
private static final ZProxy.ZPump.Identity IDENTITY
-
transformer
private final ZProxy.ZPump.Transformer transformer
-
-
Constructor Detail
-
ZPump
public ZPump()
-
ZPump
public ZPump(ZProxy.ZPump.Transformer transformer)
-
-
Method Detail
-
flow
public boolean flow(ZProxy.Plug splug, ZMQ.Socket source, ZMQ.Socket capture, ZProxy.Plug dplug, ZMQ.Socket destination)
Description copied from interface:ZProxy.PumpTransfers a message from one source to one destination, with an optional capture.- Specified by:
flowin interfaceZProxy.Pump- Parameters:
splug- the plug of the source socketsource- the socket where to receive the message from.capture- the optional sockets where to send the message to. Possibly null.dplug- the plug of the destination socketdestination- the socket where to send the message to.- Returns:
- false in case of error or interruption, true if successfully transferred the message
-
-