Changeset 97 for java/main/src/main/java/com/framsticks/communication/util/LoggingStateCallback.java
- Timestamp:
- 07/06/13 03:51:11 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/main/java/com/framsticks/communication/util/LoggingStateCallback.java
r96 r97 1 1 package com.framsticks.communication.util; 2 2 3 import com.framsticks.communication. StateCallback;4 import com.framsticks. util.FramsticksException;3 import com.framsticks.communication.ClientSideResponseFuture; 4 import com.framsticks.communication.Response; 5 5 6 6 import org.apache.log4j.Logger; … … 9 9 * @author Piotr Sniegowski 10 10 */ 11 public class LoggingStateCallback <C> extends StateCallback<C>{11 public class LoggingStateCallback extends ClientSideResponseFuture { 12 12 13 13 protected final Logger logger; … … 15 15 16 16 public LoggingStateCallback(Logger logger, String message) { 17 super(null); 17 18 this.logger = logger; 18 19 this.message = message; 19 20 } 20 21 22 // @Override 23 // public void handle(FramsticksException e) { 24 // logger.error("failed to " + message + " with " + e); 25 // } 26 21 27 @Override 22 p ublic void handle(FramsticksExceptione) {23 logger. error("failed to " + message + " with " +e);28 protected void processOk(Response response) { 29 logger.debug(message); 24 30 } 25 31 26 @Override27 public void callImpl() {28 logger.debug(message);29 }30 32 }
Note: See TracChangeset
for help on using the changeset viewer.