Package org.micromanager.pyjavaz
Class ZMQServer
java.lang.Object
org.micromanager.pyjavaz.ZMQSocketWrapper
org.micromanager.pyjavaz.ZMQServer
implements request reply server (ie the reply part)
ecompasses both the master server and the
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConcurrentHashMap<String, Object> static final StringFields inherited from class org.micromanager.pyjavaz.ZMQSocketWrapper
context_, port_, portSocketMap_, socket_, STARTING_PORT_NUMBER, type_ -
Constructor Summary
ConstructorsConstructorDescriptionThis constructor used if making a new server on a different port and all the classloader info already parsedZMQServer(Collection<ClassLoader> cls, Function<Class, Object> classMapper, String[] excludePaths, Consumer<String> debugLogger) ZMQServer(Collection<ClassLoader> cls, Function<Class, Object> classMapper, String[] excludePaths, Consumer<String> debugLogger, int port) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected mmcorej.org.json.JSONObjectstatic ZMQServervoidinitialize(int port) protected mmcorej.org.json.JSONObjectparseAndExecuteCommand(mmcorej.org.json.JSONObject request) protected voidMethods inherited from class org.micromanager.pyjavaz.ZMQSocketWrapper
getPort, receiveMessage, sendMessage
-
Field Details
-
externalObjects_
-
VERSION
- See Also:
-
-
Constructor Details
-
ZMQServer
public ZMQServer()This constructor used if making a new server on a different port and all the classloader info already parsed -
ZMQServer
public ZMQServer(Collection<ClassLoader> cls, Function<Class, Object> classMapper, String[] excludePaths, Consumer<String> debugLogger) throws URISyntaxException, UnsupportedEncodingException -
ZMQServer
public ZMQServer(Collection<ClassLoader> cls, Function<Class, Object> classMapper, String[] excludePaths, Consumer<String> debugLogger, int port) throws URISyntaxException, UnsupportedEncodingException
-
-
Method Details
-
getMasterServer
-
initialize
public void initialize(int port) - Specified by:
initializein classZMQSocketWrapper
-
close
public void close()- Overrides:
closein classZMQSocketWrapper
-
getField
protected mmcorej.org.json.JSONObject getField(Object obj, mmcorej.org.json.JSONObject json) throws mmcorej.org.json.JSONException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException - Throws:
mmcorej.org.json.JSONExceptionNoSuchFieldExceptionIllegalArgumentExceptionIllegalAccessException
-
setField
protected void setField(Object obj, mmcorej.org.json.JSONObject json) throws mmcorej.org.json.JSONException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException - Throws:
mmcorej.org.json.JSONExceptionNoSuchFieldExceptionIllegalArgumentExceptionIllegalAccessException
-
parseAndExecuteCommand
protected mmcorej.org.json.JSONObject parseAndExecuteCommand(mmcorej.org.json.JSONObject request) throws Exception - Throws:
Exception
-