Last change
on this file was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
713 bytes
|
Rev | Line | |
---|
[77] | 1 | package com.framsticks.communication.util; |
---|
| 2 | |
---|
[97] | 3 | import com.framsticks.communication.ClientSideResponseFuture; |
---|
| 4 | import com.framsticks.communication.Response; |
---|
[96] | 5 | |
---|
[100] | 6 | import org.apache.logging.log4j.Logger; |
---|
[77] | 7 | |
---|
| 8 | /** |
---|
| 9 | * @author Piotr Sniegowski |
---|
| 10 | */ |
---|
[97] | 11 | public class LoggingStateCallback extends ClientSideResponseFuture { |
---|
[77] | 12 | |
---|
| 13 | protected final Logger logger; |
---|
| 14 | protected final String message; |
---|
| 15 | |
---|
| 16 | public LoggingStateCallback(Logger logger, String message) { |
---|
[97] | 17 | super(null); |
---|
[77] | 18 | this.logger = logger; |
---|
| 19 | this.message = message; |
---|
| 20 | } |
---|
| 21 | |
---|
[97] | 22 | // @Override |
---|
| 23 | // public void handle(FramsticksException e) { |
---|
| 24 | // logger.error("failed to " + message + " with " + e); |
---|
| 25 | // } |
---|
[96] | 26 | |
---|
| 27 | @Override |
---|
[97] | 28 | protected void processOk(Response response) { |
---|
[85] | 29 | logger.debug(message); |
---|
[77] | 30 | } |
---|
[97] | 31 | |
---|
[77] | 32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.