@Override public void putCompleted(PutEvent ev) { if (log.isLoggable(Level.FINEST)) { log.log(Level.FINEST, "JCA putCompleted for channel {0} event {1}", new Object[] {getChannelName(), ev}); } if (ev.getStatus().isSuccessful()) { callback.channelWritten(null); } else { callback.channelWritten(new Exception(ev.toString())); } } };
/** * @see com.cosylab.epics.caj.impl.ResponseRequest#timeout() */ public void timeout() { cancel(); // ... and notify if (callback != null) context.getEventDispatcher().dispatch( new PutEvent(channel, DBRType.UNKNOWN, 0, CAStatus.TIMEOUT), callback ); }
public void putCompleted(PutEvent event) { CAStatus caStatus = event.getStatus(); if(!caStatus.isSuccessful()) { putDone(statusCreate.createStatus(StatusType.ERROR, caStatus.toString(), null)); return; } putDone(okStatus); } /* (non-Javadoc)
@Override public void putCompleted(PutEvent ev) { if (log.isLoggable(Level.FINEST)) { log.log(Level.FINEST, "JCA putCompleted for channel {0} event {1}", new Object[] {getChannelName(), ev}); } if (ev.getStatus().isSuccessful()) { callback.channelWritten(null); } else { callback.channelWritten(new Exception(ev.toString())); } } };
/** * @see com.cosylab.epics.caj.impl.ResponseRequest#timeout() */ public void timeout() { cancel(); // ... and notify if (callback != null) context.getEventDispatcher().dispatch( new PutEvent(channel, DBRType.UNKNOWN, 0, CAStatus.TIMEOUT), callback ); }
/** * @see com.cosylab.epics.caj.impl.NotifyResponseRequest#response(int, short, int, java.nio.ByteBuffer) */ public void response( int status, short dataType, int dataCount, ByteBuffer dataPayloadBuffer) { try { if (callback != null) { DBRType type = DBRType.forValue(dataType); CAStatus caStatus = CAStatus.forStatusCode(status); // notify context.getEventDispatcher().dispatch( new PutEvent(channel, type, dataCount, caStatus), callback ); } } finally { // allways cancel request cancel(); } }
/** * @see com.cosylab.epics.caj.impl.NotifyResponseRequest#response(int, short, int, java.nio.ByteBuffer) */ public void response( int status, short dataType, int dataCount, ByteBuffer dataPayloadBuffer) { try { if (callback != null) { DBRType type = DBRType.forValue(dataType); CAStatus caStatus = CAStatus.forStatusCode(status); // notify context.getEventDispatcher().dispatch( new PutEvent(channel, type, dataCount, caStatus), callback ); } } finally { // allways cancel request cancel(); } }