Package net.sf.agentopia.util

Examples of net.sf.agentopia.util.ClassedObjectTransmitter.transferAgentFromStream()


            intFlag = dataIn.readInt();
            if (AgentopiaConstants.MESSAGE_AGENT_COMING != intFlag) {
                throw new IOException("MESSAGE_AGENT_COMING flag expected!");
            }
            final ClassedObjectTransmitter transmitter = marketPlace.getClassedObjectTransmitter();
            agent = (IAgentopiaAgent) transmitter.transferAgentFromStream(dataIn);
            dataOut.writeInt(AgentopiaConstants.MESSAGE_TRANSFER_COMPLETED);
            dataOut.flush();
            try {
                final int ackFlag = dataIn.readInt();
                if (AgentopiaConstants.MESSAGE_TRANSFER_COMPLETED != ackFlag) {
View Full Code Here


                    if (AgentopiaConstants.SUSTAINER_DEBUG) {
                        Logger.getLogger().info("Sustainer receiving agent from \"" + getTargetId() + "\".");
                    }
                    final ClassedObjectTransmitter transmitter = marketPlace.getClassedObjectTransmitter();
                    try {
                        final IAgentopiaAgent agent = (IAgentopiaAgent) transmitter.transferAgentFromStream(dataIn);
                        Logger.getLogger().info("Agent \"" + agent + "\" entered the system (" + marketPlace.getHomeId() + ") per Sustainer.");
                        // Indicate to market place that agent is here.
                        // Run method will be called in next market tick.
                        marketPlace.agentArrived(agent);
                    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.