Java Code Examples for io.vlingo.symbio.State#TextState

The following examples show how to use io.vlingo.symbio.State#TextState . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UserIdStateAdapter.java    From vlingo-examples with Mozilla Public License 2.0 4 votes vote down vote up
@Override
public UserId fromRawState(State.TextState textState) {
    return JsonSerialization.deserialized(textState.data, textState.typed());
}
 
Example 2
Source File: UserIdStateAdapter.java    From vlingo-examples with Mozilla Public License 2.0 4 votes vote down vote up
@Override
public <ST> ST fromRawState(State.TextState textState, Class<ST> aClass) {
    return JsonSerialization.deserialized(textState.data, aClass);
}
 
Example 3
Source File: UserIdStateAdapter.java    From vlingo-examples with Mozilla Public License 2.0 4 votes vote down vote up
@Override
public State.TextState toRawState(String id, UserId state, int stateVersion, Metadata metadata) {
    final String serialization = JsonSerialization.serialized(state);
    return new State.TextState(id, CartUserSummaryData.class, typeVersion(), serialization, stateVersion, metadata);
}
 
Example 4
Source File: CartStateAdapter.java    From vlingo-examples with Mozilla Public License 2.0 4 votes vote down vote up
@Override
public CartUserSummaryData fromRawState(State.TextState textState) {
    return JsonSerialization.deserialized(textState.data, textState.typed());
}
 
Example 5
Source File: CartStateAdapter.java    From vlingo-examples with Mozilla Public License 2.0 4 votes vote down vote up
@Override
public <ST> ST fromRawState(State.TextState textState, Class<ST> aClass) {
    return JsonSerialization.deserialized(textState.data, aClass);
}
 
Example 6
Source File: CartStateAdapter.java    From vlingo-examples with Mozilla Public License 2.0 4 votes vote down vote up
@Override
public State.TextState toRawState(String id, CartUserSummaryData state, int stateVersion, Metadata metadata) {
    final String serialization = JsonSerialization.serialized(state);
    return new State.TextState(id, CartUserSummaryData.class, typeVersion(), serialization, stateVersion, metadata);
}
 
Example 7
Source File: NoopEventJournalDispatcher.java    From vlingo-examples with Mozilla Public License 2.0 2 votes vote down vote up
@Override
public void dispatch(final Dispatchable<Entry<String>, State.TextState> dispatchable) {
  
}