01: /*
02: * <copyright>
03: *
04: * Copyright 2002-2004 BBNT Solutions, LLC
05: * under sponsorship of the Defense Advanced Research Projects
06: * Agency (DARPA).
07: *
08: * You can redistribute this software and/or modify it under the
09: * terms of the Cougaar Open Source License as published on the
10: * Cougaar Open Source Website (www.cougaar.org).
11: *
12: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23: *
24: * </copyright>
25: */
26:
27: package org.cougaar.core.mobility.ldm;
28:
29: import org.cougaar.core.domain.Factory;
30: import org.cougaar.core.mobility.AbstractTicket;
31: import org.cougaar.core.mobility.Ticket;
32: import org.cougaar.core.mts.MessageAddress;
33: import org.cougaar.core.util.UID;
34:
35: /**
36: * A {@link Factory} for creating {@link AgentControl} objects.
37: */
38: public interface MobilityFactory extends Factory {
39:
40: /**
41: * Get a new ticket identifier for use when creating
42: * a Ticket.
43: */
44: Object createTicketIdentifier();
45:
46: /**
47: * Create a request that an agent be added/removed/moved,
48: * which is sent directly to the specified target.
49: * <p>
50: * Add requests must specify the node address as the
51: * target.
52: * <p>
53: * Remove requests must specify either the agent or its
54: * node as the target.
55: * <p>
56: * Move requests must specify either null, the agent,
57: * or the node running the agent that is to be moved.
58: * If the agent is specified, the request first
59: * passes through the agent (RedirectMovePlugin).
60: */
61: AgentControl createAgentControl(UID ownerUID,
62: MessageAddress target, AbstractTicket abstractTicket);
63:
64: // old API
65:
66: /**
67: * Create an agent move request -- this has been
68: * replaced by the "AgentControl" APIs, but is still
69: * supported.
70: *
71: * @param ticket must have a ticket identifier that
72: * was created by the "createTicketIdentifier()"
73: * method.
74: *
75: * @see AgentControl new API
76: */
77: MoveAgent createMoveAgent(Ticket ticket);
78:
79: }
|