mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestEventAdminNamespace.java
public static TerraHarvestMessage createEventAdminMessage(final EventAdminMessageType type, 
            final Message message)
    {
        EventAdminNamespace.Builder eventMessageBuilder = null;
        switch(type)
        {
            case EventRegistrationRequest:
            {               
                eventMessageBuilder = EventAdminNamespace.newBuilder().
                        setType(type).setData(message.toByteString());
                break;
            }
            case UnregisterEventRequest:
            {                
                eventMessageBuilder = EventAdminNamespace.newBuilder().
                        setType(type).setData(message.toByteString());
                break;
            }
            case CleanupRequest:
            {                
                eventMessageBuilder = EventAdminNamespace.newBuilder().
                        setType(EventAdminMessageType.CleanupRequest);
                break;
            }
            case SendEvent:
            {
                eventMessageBuilder = EventAdminNamespace.newBuilder().
                        setType(type).
                        setData(message.toByteString());
                break;
            }
            default:
                break;
        }

        TerraHarvestMessage thMessage = TerraHarvestMessageHelper.
                createTerraHarvestMsg(Namespace.EventAdmin, eventMessageBuilder);
        return thMessage;
    }
/**
     * Helper method for creating EventAdmin messages to be sent to controller. 
     * @param type
     *      type of message to be contained in the sent TerraHarvestMessage
     * @param message
     *      message data to be contained in the sent TerraHarvestMessage
     * @return
     *      TerraHarvestMessage to be sent to the controller
     */
Helper method for creating EventAdmin messages to be sent to controller.
@param type
type of message to be contained in the sent TerraHarvestMessage
@param message
message data to be contained in the sent TerraHarvestMessage
@return
TerraHarvestMessage to be sent to the controller
Helper method for creating EventAdmin messages to be sent to controller . @param type type of message to be contained in the sent TerraHarvestMessage @param message message data to be contained in the sent TerraHarvestMessage @return TerraHarvestMessage to be sent to the controller
public static TerraHarvestMessage createEventAdminMessage(final EventAdminMessageType type, 
            final Message message)
    {
        EventAdminNamespace.Builder eventMessageBuilder = null;
        switch(type)
        {
            case EventRegistrationRequest:
            {               
                eventMessageBuilder = EventAdminNamespace.newBuilder().
                        setType(type).setData(message.toByteString());
                break;
            }
            case UnregisterEventRequest:
            {                
                eventMessageBuilder = EventAdminNamespace.newBuilder().
                        setType(type).setData(message.toByteString());
                break;
            }
            case CleanupRequest:
            {                
                eventMessageBuilder = EventAdminNamespace.newBuilder().
                        setType(EventAdminMessageType.CleanupRequest);
                break;
            }
            case SendEvent:
            {
                eventMessageBuilder = EventAdminNamespace.newBuilder().
                        setType(type).
                        setData(message.toByteString());
                break;
            }
            default:
                break;
        }
        TerraHarvestMessage thMessage = TerraHarvestMessageHelper.
                createTerraHarvestMsg(Namespace.EventAdmin, eventMessageBuilder);
        return thMessage;
    }
public static TerraHarvestMessage createEventAdminMessage ( final EventAdminMessageType type , final Message message ) { EventAdminNamespace . Builder eventMessageBuilder = null ; switch ( type ) { case EventRegistrationRequest : { eventMessageBuilder = EventAdminNamespace . newBuilder ( ) . setType ( type ) . setData ( message . toByteString ( ) ) ; break ; } case UnregisterEventRequest : { eventMessageBuilder = EventAdminNamespace . newBuilder ( ) . setType ( type ) . setData ( message . toByteString ( ) ) ; break ; } case CleanupRequest : { eventMessageBuilder = EventAdminNamespace . newBuilder ( ) . setType ( EventAdminMessageType . CleanupRequest ) ; break ; } case SendEvent : { eventMessageBuilder = EventAdminNamespace . newBuilder ( ) . setType ( type ) . setData ( message . toByteString ( ) ) ; break ; } default : break ; } TerraHarvestMessage thMessage = TerraHarvestMessageHelper . createTerraHarvestMsg ( Namespace . EventAdmin , eventMessageBuilder ) ; return thMessage ; }
Helper method for creating EventAdmin messages to be sent to controller.
Helper method for creating EventAdmin messages to be sent to controller .