📄 agentfactory.java
字号:
package server;
import net.jxta.endpoint.Message;
import net.jxta.endpoint.MessageElement;
import java.util.*;
import java.io.*;
/** * A factory to instantiate Agent objects */
public final class AgentFactory {
private static AgentFactory factory = new AgentFactory();
/** * Get the instance of the AgentFactory */
public static AgentFactory getInstance() {
return factory;
}
/** * Instantiates an Agent based on the course. Currently returns an Agent * object. * * @param course The course requested. */
public Agent getAgent(String course) {
return new Agent();
}
}