-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
45 additions
and
16 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...r/src/main/java/com/navercorp/pinpoint/common/profiler/message/DefaultResultResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.navercorp.pinpoint.common.profiler.message; | ||
|
||
public class DefaultResultResponse implements ResultResponse { | ||
private final boolean success; | ||
private final String message; | ||
|
||
public DefaultResultResponse(boolean success, String message) { | ||
this.success = success; | ||
this.message = message; | ||
} | ||
|
||
@Override | ||
public boolean isSuccess() { | ||
return success; | ||
} | ||
|
||
@Override | ||
public String getMessage() { | ||
return message; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
profiler-test/src/main/java/com/navercorp/pinpoint/test/rpc/MockMessageConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.navercorp.pinpoint.test.rpc; | ||
|
||
import com.google.inject.Inject; | ||
import com.navercorp.pinpoint.common.profiler.message.DefaultResultResponse; | ||
import com.navercorp.pinpoint.common.profiler.message.MessageConverter; | ||
import com.navercorp.pinpoint.common.profiler.message.ResultResponse; | ||
|
||
public class MockMessageConverter implements MessageConverter<Object, ResultResponse> { | ||
|
||
@Inject | ||
public MockMessageConverter() { | ||
} | ||
|
||
@Override | ||
public ResultResponse toMessage(Object message) { | ||
return new DefaultResultResponse(true, "success by mocking"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters