public void run() {
    String fileName;
    ResponseCallback cb = new ResponseCallback(mComm, mEvent);

    try {

      if ((fileName = Serialization.DecodeString(mEvent.payload)) == null)
        throw new ProtocolException("Filename not properly encoded in request packet");

      mBroker.Remove(cb, fileName);

    } catch (ProtocolException e) {
      int error = cb.error(Error.PROTOCOL_ERROR, e.getMessage());
      log.severe("Protocol error (REMOVE) - " + e.getMessage());
      if (error != Error.OK)
        log.severe("Problem sending (REMOVE) error back to client - " + Error.GetText(error));
    }
  }
示例#2
0
 public void decode(ByteBuffer buf) {
   mMessage = Serialization.DecodeString(buf);
 }
示例#3
0
 public void encode(ByteBuffer buf) {
   Serialization.EncodeString(buf, mMessage);
 }
示例#4
0
 public int encodedLength() {
   return Serialization.EncodedLengthString(mMessage);
 }