atg.deployment.server
Interface AgentTransport


public interface AgentTransport

An interface for server to agent transport implementations.

This interface is primarily for the server side as the server needs to make these calls to the agent. The calls made from server-side transport to agent-side transport are their own business. The agent-side transport is responsible for making calls to DeploymentAgent so this interface is pretty much only for the server.

As these calls do not allow for exceptions to be thrown, any transport/network level errors should be noted by returning Status or state codes of Status.ERROR_TRANSPORT. This is the indicator the server code is looking to identify a failed transport that needs to be reinitialized.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 void close()
          The DeploymentServer allows for live reinitializations of the deployment topology, which picks up all changes to the topology XML file, including AgentTransport changes.
 java.util.Collection getAllClusterStatus()
          Returns a Collection of all the ClusterStatus objects that exist for this Agent.
 int getState()
          Returns the "short" status of the agent, specifically just the state code used to identify the agent's current state.
 Status getStatus()
          Returns the full status of the agent.
 Status getStatus(java.lang.String pClusterID)
          Returns the status of the agent for the specifiec clusterID.
 java.lang.String getTransportType()
          Returns the transport type, the same type used in the XML topology definition file.
 Status sendCommand(java.util.Map pCommandPacket)
          Sends a deployment command packet to the deployment agent.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

getTransportType

java.lang.String getTransportType()
Returns the transport type, the same type used in the XML topology definition file. Note that JNDI would not show up here as a type since JNDI types are resolved into actual transport implementations.

If the transport could not be initialized, the String BAD is returned.

Returns:
String

getState

int getState()
Returns the "short" status of the agent, specifically just the state code used to identify the agent's current state.

Status.ERROR_TRANSPORT is returned on all transport errors.

Returns:
status code for the agent at the end of the call
See Also:
Status

getStatus

Status getStatus()
Returns the full status of the agent.

A Status object with the state set to Status.ERROR_TRANSPORT is returned on all transport errors. When possible, an appropriate error message should be supplied in the Status property 'errorMessage'.

See Also:
Status

getStatus

Status getStatus(java.lang.String pClusterID)
Returns the status of the agent for the specifiec clusterID.

A Status object with the state set to Status.ERROR_TRANSPORT is returned on all transport errors. When possible, an appropriate error message should be supplied in the Status property 'errorMessage'.

See Also:
Status, ClusterStatus

getAllClusterStatus

java.util.Collection getAllClusterStatus()
Returns a Collection of all the ClusterStatus objects that exist for this Agent.

During transport errors, null is returned.

See Also:
ClusterStatus

sendCommand

Status sendCommand(java.util.Map pCommandPacket)
Sends a deployment command packet to the deployment agent.

Deployment command packets are simply Maps of serializable data. They may contain Strings, Numeric types, arrays of bytes, or Status objects.

All information necessary for the deployment command is contained within the command packet. The AgentTransport is expected to transport the packet to the remote agent server and call DeploymentAgent.handleCommand() with the packet. The deployment agent returns a Status object which is the result of the deployment command and must be returned by this method.

Returns:
resultant Status from the issued deployment command

close

void close()
           throws atg.deployment.common.DeploymentException
The DeploymentServer allows for live reinitializations of the deployment topology, which picks up all changes to the topology XML file, including AgentTransport changes. Because an AgentTransport may pick up changes in implementation (for example, different port numbers or machine names) as a result of topology reinitialization, the DeploymentServer uses close() to indicate to an AgentTransport that the topology is going to be reinitialized and, therefore, the transport should close down in order to be recreated. NOTE: This call is not a directive to the remote deployment agent, only to the local agent transport. This call should not be confused as a directive to the remote agent to shutdown.

Throws:
atg.deployment.common.DeploymentException