Search in sources :

Example 16 with EngineId

use of com.vodafone360.people.engine.EngineManager.EngineId in project 360-Engine-for-Android by 360.

the class NowPlusDatatypesTests method testCreatePushEvent.

public void testCreatePushEvent() {
    RpgPushMessage msg = new RpgPushMessage();
    msg.mType = PushMessageTypes.CONTACTS_CHANGE;
    EngineId engId = EngineId.ACTIVITIES_ENGINE;
    PushEvent input = (PushEvent) PushEvent.createPushEvent(msg, engId);
    assertEquals(BaseDataType.PUSH_EVENT_DATA_TYPE, input.getType());
    assertEquals(msg.mType, input.mMessageType);
    assertEquals(engId, input.mEngineId);
}
Also used : EngineId(com.vodafone360.people.engine.EngineManager.EngineId) PushEvent(com.vodafone360.people.datatypes.PushEvent) RpgPushMessage(com.vodafone360.people.service.io.rpg.RpgPushMessage)

Example 17 with EngineId

use of com.vodafone360.people.engine.EngineManager.EngineId in project 360-Engine-for-Android by 360.

the class EngineTestFramework method reportBackToFramework.

@Override
public void reportBackToFramework(int reqId, EngineId engine) {
    Log.d("TAG", "EngineTestFramework.reportBackToFramework");
    mObserver.reportBackToEngine(reqId, engine);
    final QueueManager reqQ = QueueManager.getInstance();
    final ResponseQueue respQ = ResponseQueue.getInstance();
    if (reqQ.getRequest(reqId) != null) {
        List<BaseDataType> dataTypeList = new ArrayList<BaseDataType>();
        ServerError err = new ServerError(ServerError.ErrorType.UNKNOWN);
        dataTypeList.add(err);
        respQ.addToResponseQueue(new DecodedResponse(reqId, dataTypeList, engine, DecodedResponse.ResponseType.SERVER_ERROR.ordinal()));
    }
}
Also used : DecodedResponse(com.vodafone360.people.service.io.ResponseQueue.DecodedResponse) ServerError(com.vodafone360.people.datatypes.ServerError) ArrayList(java.util.ArrayList) BaseDataType(com.vodafone360.people.datatypes.BaseDataType) ResponseQueue(com.vodafone360.people.service.io.ResponseQueue) QueueManager(com.vodafone360.people.service.io.QueueManager)

Aggregations

DecodedResponse (com.vodafone360.people.service.io.ResponseQueue.DecodedResponse)11 BaseDataType (com.vodafone360.people.datatypes.BaseDataType)9 ServerError (com.vodafone360.people.datatypes.ServerError)9 ResponseQueue (com.vodafone360.people.service.io.ResponseQueue)9 ArrayList (java.util.ArrayList)9 Request (com.vodafone360.people.service.io.Request)5 EngineId (com.vodafone360.people.engine.EngineManager.EngineId)4 Identity (com.vodafone360.people.datatypes.Identity)3 StatusMsg (com.vodafone360.people.datatypes.StatusMsg)3 AuthSessionHolder (com.vodafone360.people.datatypes.AuthSessionHolder)2 ServiceUiRequest (com.vodafone360.people.service.ServiceUiRequest)2 QueueManager (com.vodafone360.people.service.io.QueueManager)2 IOException (java.io.IOException)2 ActivityContact (com.vodafone360.people.datatypes.ActivityContact)1 ActivityItem (com.vodafone360.people.datatypes.ActivityItem)1 ExternalResponseObject (com.vodafone360.people.datatypes.ExternalResponseObject)1 IdentityCapability (com.vodafone360.people.datatypes.IdentityCapability)1 PushChatConversationEvent (com.vodafone360.people.datatypes.PushChatConversationEvent)1 PushChatMessageEvent (com.vodafone360.people.datatypes.PushChatMessageEvent)1 PushClosedConversationEvent (com.vodafone360.people.datatypes.PushClosedConversationEvent)1