Examples of transferAgentToStream()


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

     * @exception IOException If transfer failed for whatever reason.
     */
    public void transferMe(IAgentopiaAgent agent) throws IOException {
        writeInt(AgentopiaConstants.MESSAGE_AGENT_COMING);
        final ClassedObjectTransmitter transmitter = new ClassedObjectTransmitter();
        transmitter.transferAgentToStream(agent, this.dataOut);
        lastAgentTransferred = agent;
        // Wait up to 24 hour for ack flag.
        final long ONE_DAY = 24L * 60L * 60L * 1000L;
        final int ackFlag = readInt((int) ONE_DAY);
        if (AgentopiaConstants.MESSAGE_TRANSFER_COMPLETED != ackFlag) {
View Full Code Here

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

                        final IAgentopiaAgent agent = transferQueue.get(0);
                        final ClassedObjectTransmitter transmitter = marketPlace.getClassedObjectTransmitter();
                        try {
                            transferQueue.remove(0);
                            writeInt(AgentopiaConstants.MESSAGE_AGENT_COMING);
                            transmitter.transferAgentToStream(agent, dataOut);
                            Logger.getLogger().info("Agent \"" + agent + "\" left the system (" + marketPlace.getHomeId() + ") per Sustainer.");
                            agent.shutDown();
                        }
                        catch (IOException exc) {
                            // Agent sending failed... But no problem here.
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.