<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.rifidi.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.rifidi.net/index.php?action=history&amp;feed=atom&amp;title=READERNAME_Protocol.java</id>
		<title>READERNAME Protocol.java - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.rifidi.net/index.php?action=history&amp;feed=atom&amp;title=READERNAME_Protocol.java"/>
		<link rel="alternate" type="text/html" href="http://wiki.rifidi.net/index.php?title=READERNAME_Protocol.java&amp;action=history"/>
		<updated>2026-08-05T20:31:47Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.1</generator>

	<entry>
		<id>http://wiki.rifidi.net/index.php?title=READERNAME_Protocol.java&amp;diff=1111&amp;oldid=prev</id>
		<title>Jmaine: /* removeProtocol */</title>
		<link rel="alternate" type="text/html" href="http://wiki.rifidi.net/index.php?title=READERNAME_Protocol.java&amp;diff=1111&amp;oldid=prev"/>
				<updated>2008-04-17T19:54:06Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;removeProtocol&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 19:54, 17 April 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=removeProtocol=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=removeProtocol=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This method removes protocols on incoming messages.&amp;#160; It also splits up commands if more than two commands are sent at the same time and read from the TCP socket all at once. These command are sent one at a time to [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;/&lt;/del&gt;READERNAME_CommandFormatter.java]]::decode(byte[] arg) to be parsed and sent to the command handler.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This method removes protocols on incoming messages.&amp;#160; It also splits up commands if more than two commands are sent at the same time and read from the TCP socket all at once. These command are sent one at a time to [[READERNAME_CommandFormatter.java]]::decode(byte[] arg) to be parsed and sent to the command handler.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;public List&amp;lt;byte[]&amp;gt; removeProtocol(byte[] data);&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;public List&amp;lt;byte[]&amp;gt; removeProtocol(byte[] data);&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jmaine</name></author>	</entry>

	<entry>
		<id>http://wiki.rifidi.net/index.php?title=READERNAME_Protocol.java&amp;diff=1110&amp;oldid=prev</id>
		<title>Jmaine: /* removeProtocol */</title>
		<link rel="alternate" type="text/html" href="http://wiki.rifidi.net/index.php?title=READERNAME_Protocol.java&amp;diff=1110&amp;oldid=prev"/>
				<updated>2008-04-17T19:53:49Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;removeProtocol&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 19:53, 17 April 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=removeProtocol=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=removeProtocol=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This method removes protocols on incoming messages.&amp;#160; It also splits up commands if more than two commands are sent at the same time and read from the TCP socket all at once.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This method removes protocols on incoming messages.&amp;#160; It also splits up commands if more than two commands are sent at the same time and read from the TCP socket all at once&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. These command are sent one at a time to [[/READERNAME_CommandFormatter.java]]::decode(byte[] arg) to be parsed and sent to the command handler&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;public List&amp;lt;byte[]&amp;gt; removeProtocol(byte[] data);&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;public List&amp;lt;byte[]&amp;gt; removeProtocol(byte[] data);&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jmaine</name></author>	</entry>

	<entry>
		<id>http://wiki.rifidi.net/index.php?title=READERNAME_Protocol.java&amp;diff=894&amp;oldid=prev</id>
		<title>Kyle at 00:34, 12 February 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.rifidi.net/index.php?title=READERNAME_Protocol.java&amp;diff=894&amp;oldid=prev"/>
				<updated>2008-02-12T00:34:51Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 00:34, 12 February 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[category:developerDoc]][[category:emulatorDoc]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This class removes protocols from incoming messages and adds protocols to outgoing messages.&amp;#160; In addition it parses incoming messages to make sure that only one command at a time is placed on the incoming message buffer.&amp;#160; See [[Command Flow]].&amp;#160; This class should implement Protocol.&amp;#160; If nothing special needs to happen, the reader can use RawProtocol.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This class removes protocols from incoming messages and adds protocols to outgoing messages.&amp;#160; In addition it parses incoming messages to make sure that only one command at a time is placed on the incoming message buffer.&amp;#160; See [[Command Flow]].&amp;#160; This class should implement Protocol.&amp;#160; If nothing special needs to happen, the reader can use RawProtocol.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kyle</name></author>	</entry>

	<entry>
		<id>http://wiki.rifidi.net/index.php?title=READERNAME_Protocol.java&amp;diff=864&amp;oldid=prev</id>
		<title>Kyle: New page: This class removes protocols from incoming messages and adds protocols to outgoing messages.  In addition it parses incoming messages to make sure that only one command at a time is placed...</title>
		<link rel="alternate" type="text/html" href="http://wiki.rifidi.net/index.php?title=READERNAME_Protocol.java&amp;diff=864&amp;oldid=prev"/>
				<updated>2008-02-11T18:48:20Z</updated>
		
		<summary type="html">&lt;p&gt;New page: This class removes protocols from incoming messages and adds protocols to outgoing messages.  In addition it parses incoming messages to make sure that only one command at a time is placed...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This class removes protocols from incoming messages and adds protocols to outgoing messages.  In addition it parses incoming messages to make sure that only one command at a time is placed on the incoming message buffer.  See [[Command Flow]].  This class should implement Protocol.  If nothing special needs to happen, the reader can use RawProtocol.&lt;br /&gt;
&lt;br /&gt;
=addProtocol=&lt;br /&gt;
&lt;br /&gt;
This method adds a protocol to outgoing messages.  For example, if the outgoing message needs to be an HTTP message, the protocol should construct the necessary HTTP part of the outgoing message&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;public byte[] addProtocol(byte[] data);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
# data - The response from the reader that needs a protocol added to it.&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
A message that is properly encoded with the correct protocol that is ready to be sent back to the client.&lt;br /&gt;
&lt;br /&gt;
==Reference Implementation==&lt;br /&gt;
This is the implementation of the addProtocol() method in the alien reader.  For it, nothing special needs to happen.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	public byte[] addProtocol(byte[] data) {&lt;br /&gt;
		return data;&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=removeProtocol=&lt;br /&gt;
&lt;br /&gt;
This method removes protocols on incoming messages.  It also splits up commands if more than two commands are sent at the same time and read from the TCP socket all at once.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;public List&amp;lt;byte[]&amp;gt; removeProtocol(byte[] data);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
# data - A list of bytes that has been read from the TCP socket&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
A list of commands, where each item in the list is a single command&lt;br /&gt;
&lt;br /&gt;
==Reference Implementation==&lt;br /&gt;
This is the implementation of the removeProtocol() method in the alien reader.  It splits up messages using '\n' as a deliminator.  It then puts each individual message in its own slot in an array and returns the array.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	public List&amp;lt;byte[]&amp;gt; removeProtocol(byte[] data)&lt;br /&gt;
			throws ProtocolValidationException {&lt;br /&gt;
		List&amp;lt;byte[]&amp;gt; retVal = new ArrayList&amp;lt;byte[]&amp;gt;();&lt;br /&gt;
		String strData = new String(data);&lt;br /&gt;
		String[] arrayData = strData.split(&amp;quot;\n&amp;quot;);&lt;br /&gt;
		for( String i:arrayData ) {&lt;br /&gt;
			retVal.add(i.getBytes());&lt;br /&gt;
		}&lt;br /&gt;
		return retVal;&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kyle</name></author>	</entry>

	</feed>