/** * Lets copy across any transient fields from this command * to the complete command when it is unmarshalled on the other end * * @param completeCommand the newly unmarshalled complete command */ public void configure(Command completeCommand) { // copy across the transient properties added by the low level transport completeCommand.setFrom(getFrom()); } }
answer.setFrom(from);
public Command read() throws IOException { Command answer = null; Endpoint from = null; synchronized (readLock) { while (true) { DatagramPacket datagram = createDatagramPacket(); channel.receive(datagram); // TODO could use a DataInput implementation that talks direct // to the byte[] to avoid object allocation receiveCounter++; DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(datagram.getData(), 0, datagram.getLength())); from = headerMarshaller.createEndpoint(datagram, dataIn); answer = (Command)wireFormat.unmarshal(dataIn); break; } } if (answer != null) { answer.setFrom(from); if (LOG.isDebugEnabled()) { LOG.debug("Channel: " + name + " about to process: " + answer); } } return answer; }
/** * Lets copy across any transient fields from this command * to the complete command when it is unmarshalled on the other end * * @param completeCommand the newly unmarshalled complete command */ public void configure(Command completeCommand) { // copy across the transient properties added by the low level transport completeCommand.setFrom(getFrom()); } }
/** * Lets copy across any transient fields from this command * to the complete command when it is unmarshalled on the other end * * @param completeCommand the newly unmarshalled complete command */ public void configure(Command completeCommand) { // copy across the transient properties added by the low level transport completeCommand.setFrom(getFrom()); } }
/** * Lets copy across any transient fields from this command * to the complete command when it is unmarshalled on the other end * * @param completeCommand the newly unmarshalled complete command */ public void configure(Command completeCommand) { // copy across the transient properties added by the low level transport completeCommand.setFrom(getFrom()); } }
/** * Lets copy across any transient fields from this command * to the complete command when it is unmarshalled on the other end * * @param completeCommand the newly unmarshalled complete command */ public void configure(Command completeCommand) { // copy across the transient properties added by the low level transport completeCommand.setFrom(getFrom()); } }
public Command read() throws IOException { Command answer = null; Endpoint from = null; synchronized (readLock) { while (true) { DatagramPacket datagram = createDatagramPacket(); channel.receive(datagram); // TODO could use a DataInput implementation that talks direct // to the byte[] to avoid object allocation receiveCounter++; DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(datagram.getData(), 0, datagram.getLength())); from = headerMarshaller.createEndpoint(datagram, dataIn); answer = (Command)wireFormat.unmarshal(dataIn); break; } } if (answer != null) { answer.setFrom(from); if (LOG.isDebugEnabled()) { LOG.debug("Channel: " + name + " about to process: " + answer); } } return answer; }
public Command read() throws IOException { Command answer = null; Endpoint from = null; synchronized (readLock) { while (true) { DatagramPacket datagram = createDatagramPacket(); channel.receive(datagram); // TODO could use a DataInput implementation that talks direct // to the byte[] to avoid object allocation receiveCounter++; DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(datagram.getData(), 0, datagram.getLength())); from = headerMarshaller.createEndpoint(datagram, dataIn); answer = (Command)wireFormat.unmarshal(dataIn); break; } } if (answer != null) { answer.setFrom(from); if (LOG.isDebugEnabled()) { LOG.debug("Channel: " + name + " about to process: " + answer); } } return answer; }
public Command read() throws IOException { Command answer = null; Endpoint from = null; synchronized (readLock) { while (true) { DatagramPacket datagram = createDatagramPacket(); channel.receive(datagram); // TODO could use a DataInput implementation that talks direct // to the byte[] to avoid object allocation receiveCounter++; DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(datagram.getData(), 0, datagram.getLength())); from = headerMarshaller.createEndpoint(datagram, dataIn); answer = (Command)wireFormat.unmarshal(dataIn); break; } } if (answer != null) { answer.setFrom(from); if (LOG.isDebugEnabled()) { LOG.debug("Channel: " + name + " about to process: " + answer); } } return answer; }
answer.setFrom(from);
answer.setFrom(from);
public Command read() throws IOException { Command answer = null; Endpoint from = null; synchronized (readLock) { while (true) { DatagramPacket datagram = createDatagramPacket(); channel.receive(datagram); // TODO could use a DataInput implementation that talks direct // to the byte[] to avoid object allocation receiveCounter++; DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(datagram.getData(), 0, datagram.getLength())); from = headerMarshaller.createEndpoint(datagram, dataIn); answer = (Command)wireFormat.unmarshal(dataIn); break; } } if (answer != null) { answer.setFrom(from); if (LOG.isDebugEnabled()) { LOG.debug("Channel: " + name + " about to process: " + answer); } } return answer; }
answer.setFrom(from);
answer.setFrom(from);