Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "../User_Guide.ent">
%BOOK_ENTITIES;
]>

<section id="ratype_events">

	<title>Events</title>

	<para>The Events fired by &THIS.RA; Resource Adaptor represent an incoming TFTP Request. The table below lists the Resource Adaptor Type event types.</para>

	<table frame="all" pgwide="1">
		<title>Events fired on the TransferActivity:</title>
		<tgroup colsep="1" cols="5" align="left">
			<colspec colnum="1" colname="c0" colwidth="4*" />
			<colspec colnum="2" colname="c1" colwidth="2*" />
			<colspec colnum="3" colname="c2" colwidth="1*" />
			<colspec colnum="4" colname="c3" colwidth="4*" />
			<colspec colnum="5" colname="c4" colwidth="3*" />
			<thead>
				<row>
					<entry>Name</entry>
					<entry>Vendor</entry>
					<entry>Version</entry>
					<entry>Event Class</entry>
					<entry>Description</entry>
				</row>
			</thead>
			<tbody>
				<row>
					<entry>net.java.slee. resource.tftp.events. incoming.request.READ</entry>
					<entry>net.java.slee</entry>
					<entry>1.0</entry>
					<entry>net.java.slee. resource.tftp.events. RequestEvent</entry>					
					<entry>An incoming <literal>READ</literal> TFTP request.</entry>
				</row>
				<row>
					<entry>net.java.slee. resource.tftp.events. incoming.request.WRITE</entry>
					<entry>net.java.slee</entry>
					<entry>1.0</entry>
					<entry>net.java.slee. resource.tftp.events. RequestEvent</entry>					
					<entry>An incoming <literal>WRITE</literal> TFTP request.</entry>
				</row>
				<row>
					<entry>net.java.slee. resource.tftp.events. incoming.request.DATA</entry>
					<entry>net.java.slee</entry>
					<entry>1.0</entry>
					<entry>net.java.slee. resource.tftp.events. RequestEvent</entry>					
					<entry>An incoming TFTP <literal>DATA</literal> block.</entry>
				</row>
				<row>
					<entry>net.java.slee. resource.tftp.events. incoming.request.ACK</entry>
					<entry>net.java. slee</entry>
					<entry>1.0</entry>
					<entry>net.java.slee. resource.tftp.events. RequestEvent</entry>					
					<entry>An incoming TFTP <literal>ACK</literal>.</entry>
				</row>
	 			<row>
					<entry>net.java.slee. resource.tftp.events. incoming.request.ERROR</entry>
					<entry>net.java.slee</entry>
					<entry>1.0</entry>
					<entry>net.java.slee. resource.tftp.events. RequestEvent</entry>					
					<entry>An incoming TFTP <literal>ERROR</literal> block.</entry>
				</row>
			</tbody>
		</tgroup>
	</table>

	<important>
		<para>Spaces where introduced in <literal>Name</literal> and <literal>Event Class</literal> column values, to correctly render the table. Please remove them when using copy/paste.</para>
	</important>

	<para>All event types use the same type <literal>net.java.slee.resource.tftp.events.RequestEvent</literal>. It's interface is as follows:</para>

	<programlisting language="Java" role="JAVA">
		<![CDATA[
package net.java.slee.resource.tftp.events;

import org.apache.commons.net.tftp.TFTPPacket;

public interface RequestEvent {

	public TFTPPacket getRequest(); 

    public String getTypeDescr();

    public String getId();

}]]>
     </programlisting>

     <variablelist>
     	<varlistentry>
			<term>The <literal>getRequest()</literal> method:</term>
			<listitem>
				<para>Retrieves the TFTP request packet which is associated with the event.</para>
			</listitem>
		</varlistentry>

		<varlistentry>
			<term>The <literal>getTypeDescr()</literal> method:</term>
			<listitem>
				<para>Retrieves the type description associated with the request.</para>
			</listitem>
		</varlistentry>

		<varlistentry>
			<term>The <literal>getId()</literal> method:</term>
			<listitem>
				<para>Retrieves unique event ID.</para>
			</listitem>
		</varlistentry>	
	</variablelist>

</section>
New to GrepCode? Check out our FAQ X