org.robokind.api.motion.messaging
Interface RobotResponseFactory


public interface RobotResponseFactory

Factory for creating the default types of RobotResponses.

Author:
Matthew Stevenson

Method Summary
 RobotDefinitionResponse createDefinitionResponse(RobotResponse.RobotResponseHeader header, Robot robot)
          Creates a new RobotDefinitionResponse.
 RobotResponse.RobotResponseHeader createHeader(Robot.Id robotId, String sourceId, String destinationId, String requestType, long requestTimestamp)
          Creates a response header.
 RobotResponse.RobotPositionResponse createPositionResponse(RobotResponse.RobotResponseHeader header, Robot.RobotPositionMap positions)
          Creates a new RobotPositionResponse.
 RobotResponse.RobotStatusResponse createStatusResponse(RobotResponse.RobotResponseHeader header, boolean status)
          Creates a new RobotStatusResponse.
 

Method Detail

createHeader

RobotResponse.RobotResponseHeader createHeader(Robot.Id robotId,
                                               String sourceId,
                                               String destinationId,
                                               String requestType,
                                               long requestTimestamp)
Creates a response header.

Parameters:
robotId - responding robot
sourceId - response source
destinationId - response destination
requestType - type of request being responded to
requestTimestamp - timestamp of the request being responded to
Returns:
new response header

createDefinitionResponse

RobotDefinitionResponse createDefinitionResponse(RobotResponse.RobotResponseHeader header,
                                                 Robot robot)
Creates a new RobotDefinitionResponse.

Parameters:
header - response header to use
robot - robot to define
Returns:
new RobotDefinitionResponse

createStatusResponse

RobotResponse.RobotStatusResponse createStatusResponse(RobotResponse.RobotResponseHeader header,
                                                       boolean status)
Creates a new RobotStatusResponse.

Parameters:
header - response header to use
status - response status value
Returns:
new RobotStatusResponse

createPositionResponse

RobotResponse.RobotPositionResponse createPositionResponse(RobotResponse.RobotResponseHeader header,
                                                           Robot.RobotPositionMap positions)
Creates a new RobotPositionResponse.

Parameters:
header - response header to use
positions - RobotPositionMap to respond with
Returns:
new RobotPositionResponse


Copyright © 2011-2013. All Rights Reserved.