Package org.apache.storm.multilang
Class JsonSerializer
java.lang.Object
org.apache.storm.multilang.JsonSerializer
- All Implemented Interfaces:
- Serializable,- ISerializer
JsonSerializer implements the JSON multilang protocol.
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionconnect(Map<String, Object> conf, TopologyContext context) This method transmits the Storm config to the non-JVM process and receives its pid.voidinitialize(OutputStream processIn, InputStream processOut) This method sets the input and output streams of the serializer.This method receives a shell message from the non-JVM process.voidwriteBoltMsg(BoltMsg boltMsg) This method sends a bolt message to a non-JVM bolt process.voidwriteSpoutMsg(SpoutMsg msg) This method sends a spout message to a non-JVM spout process.voidwriteTaskIds(List<Integer> taskIds) This method sends a list of task IDs to a non-JVM bolt process.
- 
Field Details- 
DEFAULT_CHARSET- See Also:
 
 
- 
- 
Constructor Details- 
JsonSerializerpublic JsonSerializer()
 
- 
- 
Method Details- 
initializeDescription copied from interface:ISerializerThis method sets the input and output streams of the serializer.- Specified by:
- initializein interface- ISerializer
- Parameters:
- processIn- output stream to non-JVM component
- processOut- input stream from non-JVM component
 
- 
connectpublic Number connect(Map<String, Object> conf, TopologyContext context) throws IOException, NoOutputExceptionDescription copied from interface:ISerializerThis method transmits the Storm config to the non-JVM process and receives its pid.- Specified by:
- connectin interface- ISerializer
- Parameters:
- conf- storm configuration
- context- topology context
- Returns:
- process pid
- Throws:
- IOException
- NoOutputException
 
- 
writeBoltMsgDescription copied from interface:ISerializerThis method sends a bolt message to a non-JVM bolt process.- Specified by:
- writeBoltMsgin interface- ISerializer
- Parameters:
- boltMsg- bolt message
- Throws:
- IOException
 
- 
writeSpoutMsgDescription copied from interface:ISerializerThis method sends a spout message to a non-JVM spout process.- Specified by:
- writeSpoutMsgin interface- ISerializer
- Parameters:
- msg- spout message
- Throws:
- IOException
 
- 
writeTaskIdsDescription copied from interface:ISerializerThis method sends a list of task IDs to a non-JVM bolt process.- Specified by:
- writeTaskIdsin interface- ISerializer
- Parameters:
- taskIds- list of task IDs
- Throws:
- IOException
 
- 
readShellMsgDescription copied from interface:ISerializerThis method receives a shell message from the non-JVM process.- Specified by:
- readShellMsgin interface- ISerializer
- Returns:
- shell message
- Throws:
- IOException
- NoOutputException
 
 
-