Package jadex.bdiv3.tutorial.g1
Class TranslationBDI
- java.lang.Object
-
- jadex.bdiv3.tutorial.g1.TranslationBDI
-
public class TranslationBDI extends java.lang.Object
TranslationAgent: Lesson G1.
Using a separate thread to accept http connections.Explanation
The agent opens a server connection at port 9199 and waits for translation requests.
Direct your browser to e.g. http://localhost:9199/dog to perform a translation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
TranslationBDI.Translate
-
Field Summary
Fields Modifier and Type Field Description protected jadex.bridge.IInternalAccess
agent
protected jadex.bdiv3.features.IBDIAgentFeature
bdiFeature
protected jadex.bridge.component.IExecutionFeature
execFeature
protected java.net.ServerSocket
server
The server socket.protected java.util.Map<java.lang.String,java.lang.String>
wordtable
The wordtable.
-
Constructor Summary
Constructors Constructor Description TranslationBDI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init()
void
killed()
Called when the agent is terminated.void
translate(TranslationBDI.Translate trans)
Plan that translates a request.
-
-
-
Field Detail
-
execFeature
protected jadex.bridge.component.IExecutionFeature execFeature
-
bdiFeature
protected jadex.bdiv3.features.IBDIAgentFeature bdiFeature
-
agent
protected jadex.bridge.IInternalAccess agent
-
wordtable
protected java.util.Map<java.lang.String,java.lang.String> wordtable
The wordtable.
-
server
protected java.net.ServerSocket server
The server socket.
-
-
Method Detail
-
init
public void init()
-
killed
public void killed()
Called when the agent is terminated.
-
translate
public void translate(TranslationBDI.Translate trans)
Plan that translates a request.
-
-