|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.soda.dk.core.EscObject
org.eclipse.soda.dk.transport.Transport
org.eclipse.soda.dk.transport.ThreadTransport
org.eclipse.soda.dk.udp.transport.UdpTransport
public class UdpTransport
User Diagram Protocol (UDP) Transport.
The devicekit properties keys and default values.
The list of exported services:
UdpTransportService,
TransportService| Field Summary | |
|---|---|
static java.lang.String |
CLASS_NAME
Defines the class name. |
protected static int |
DEFAULT_LOCALPORT
Define the default local port (int) constant. |
protected int |
localPortNum
Define the local port num (int) field. |
protected java.net.InetAddress |
remoteHostAddress
Define the remote host (InetAddress) field. |
static int |
SOCKET_CONNECT_EXCEPTION_RESOURCE
Define the socket connect exception resource (int) constant. |
static int |
UNKNOWN_HOST_EXCEPTION_RESOURCE
Define the unknown host exception resource (int) constant. |
| Fields inherited from class org.eclipse.soda.dk.core.EscObject |
|---|
EMPTY_BYTES, EMPTY_STRING, ID_FILTER_KEY, ID_KEY, ID_KEY_ANY, INTEGER_TABLE, KEY_KEY, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_TRACE, LOG_WARNING, PREFIX_KEY, RESOURCE_BUNDLE, SLEEP_EXCEPTION_RESOURCE, SYSTEM_INFO_RESOURCE, TO_STRING_CONFIGURATION_KEYS, TRACE_LEVEL_HIGH, TRACE_LEVEL_LOW, TRACE_LEVEL_MAX, TRACE_LEVEL_MIN, TRACE_LEVEL_NONE, TRACE_LEVEL_NORMAL, TRACELEVEL_KEY, UNKNOWN_ERROR_RESOURCE |
| Fields inherited from interface org.eclipse.soda.dk.udp.transport.service.UdpTransportService |
|---|
FACTORY_SERVICE_NAME, LOCALHOST_KEY, LOCALPORT_KEY, MANAGED_SERVICE_NAME, PACKETSIZE_KEY, REMOTEHOST_KEY, REMOTEPORT_KEY, SERVICE_NAME |
| Constructor Summary | |
|---|---|
UdpTransport()
Constructs a new instance of the UdpTransport class. |
|
UdpTransport(java.lang.String remoteHostString,
int remotePortNum,
java.lang.String localHostString,
int localPortNum,
int packetSize,
int readTimeout)
Constructs an UdpTransport object using the input
parameter(s). |
|
| Method Summary | |
|---|---|
protected boolean |
attemptRecoveryFromError(int errorNumber,
java.lang.Throwable error)
Attempt recovery from error. |
void |
close()
Perform the close action method. |
void |
connect()
Perform the connect action method. |
protected java.net.DatagramSocket |
createSocket()
Perform the createSocket method and return the DatagramSocket result. |
protected void |
finalize()
Perform the finalize action method. |
protected int |
getErrorSeverity(int errorNumber,
java.lang.Throwable error)
Gets the error severity based on the error number and error input parameters. |
java.lang.String |
getLocalhost()
Gets the value of localhost custom parameter. |
int |
getLocalport()
Gets the value of localport custom parameter. |
int |
getPacketsize()
Gets the value of packetsize custom parameter. |
protected int |
getReadTimeout()
Gets the int readTimeout property value. |
java.lang.String |
getRemotehost()
Gets the value of remotehost custom parameter. |
int |
getRemoteport()
Gets the value of remoteport custom parameter. |
java.lang.String |
getResource(int resourceId)
Gets the string resource using the supplied resourceId. |
protected java.net.DatagramSocket |
getSocket()
Gets the DatagramSocket socket property value. |
void |
processInput()
Perform the processInput action method. |
void |
setLocalhost(java.lang.String localhost)
Sets the value of localhost custom parameter. |
void |
setLocalport(int localport)
Sets the value of localport custom parameter. |
void |
setPacketsize(int packetsize)
Sets the value of packetsize custom parameter. |
protected void |
setReadTimeout(int readTimeout)
Sets the readTimeout property. |
void |
setRemotehost(java.lang.String remotehost)
Sets the value of remotehost custom parameter. |
void |
setRemoteport(int remoteport)
Sets the value of remoteport custom parameter. |
protected void |
setSocket(java.net.DatagramSocket socket)
Sets the socket property. |
void |
setup()
Sets user-defined varables to use in the test. |
void |
write(byte[] sendBytes)
Perform the send action method. |
| Methods inherited from class org.eclipse.soda.dk.transport.ThreadTransport |
|---|
getBufferSize, getShutdownTimeout, getThread, handleNoData, handleNoInput, isRunning, processInput, processInput, run, setRunning, setThread, shutdown, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.soda.dk.core.service.ConfigurationService |
|---|
getBoolean, getFloat, getInt, getLong, getObject |
| Field Detail |
|---|
public static final java.lang.String CLASS_NAME
protected static final int DEFAULT_LOCALPORT
public static final int SOCKET_CONNECT_EXCEPTION_RESOURCE
public static final int UNKNOWN_HOST_EXCEPTION_RESOURCE
protected int localPortNum
protected java.net.InetAddress remoteHostAddress
| Constructor Detail |
|---|
public UdpTransport()
UdpTransport(String,int,String,int,int,int)
public UdpTransport(java.lang.String remoteHostString,
int remotePortNum,
java.lang.String localHostString,
int localPortNum,
int packetSize,
int readTimeout)
throws java.lang.RuntimeException
UdpTransport object using the input
parameter(s).
java.lang.String
int
java.lang.String
int
int
The read timeout (int) parameter.
Runtime Exception.
remoteHostString - The remote host string (String) parameter.remotePortNum - The remote port num (int) parameter.localHostString - The local host string (String) parameter.localPortNum - The local port num (int) parameter.packetSize - The packet size (int) parameter.readTimeout - The read timeout (int) parameter.
java.lang.RuntimeException - Runtime Exception.UdpTransport()| Method Detail |
|---|
protected boolean attemptRecoveryFromError(int errorNumber,
java.lang.Throwable error)
Transport
attemptRecoveryFromError in class TransporterrorNumber - The error number (int) parameter.error - The error (Throwable) parameter.
boolean)
value.The error number (int) parameter.
The error (Throwable) parameter.public void close()
close in class Transport
public void connect()
throws java.lang.Exception
connect in class Transportjava.lang.Exception
protected java.net.DatagramSocket createSocket()
throws java.io.IOException
DatagramSocket result.
href="java.io.IOException.html">IOException Thrown if
the IOException exception condition occurs.
DatagramSocket)
value.
java.io.IOExceptiongetSocket(),
setSocket(DatagramSocket)
protected void finalize()
throws java.lang.Throwable
finalize in class Transportjava.lang.ThrowableObject.finalize()
protected int getErrorSeverity(int errorNumber,
java.lang.Throwable error)
Transport
getErrorSeverity in class TransporterrorNumber - The error number (int) parameter.error - The error (Throwable) parameter.
int) value.The error number (int) parameter.
The error (Throwable) parameter.public java.lang.String getLocalhost()
String) value.setLocalhost(String)public int getLocalport()
int) value.setLocalport(int)public int getPacketsize()
int) value.setPacketsize(int)protected int getReadTimeout()
int readTimeout property value.
int) value.setReadTimeout(int)public java.lang.String getRemotehost()
String) value.setRemotehost(String)public int getRemoteport()
int) value.setRemoteport(int)public java.lang.String getResource(int resourceId)
int) parameter.
getResource in class TransportresourceId - The resource id (int) parameter.
String) value.EscObject.getDefaultResource(int)protected java.net.DatagramSocket getSocket()
DatagramSocket socket property value.
DatagramSocket)
value.createSocket(),
setSocket(DatagramSocket)
public void processInput()
throws java.lang.Exception
processInput in class ThreadTransportjava.lang.ExceptionThreadTransport.handleNoInput(),
ThreadTransport.processInput(byte[],int),
ThreadTransport.processInput(int)public void setLocalhost(java.lang.String localhost)
String) parameter.
localhost - The localhost (String) parameter.getLocalhost()public void setLocalport(int localport)
int) parameter.
localport - The localport (int) parameter.getLocalport()public void setPacketsize(int packetsize)
int) parameter.
packetsize - The packetsize (int) parameter.getPacketsize()protected void setReadTimeout(int readTimeout)
int).
readTimeout - The read timeout (int) parameter.getReadTimeout()public void setRemotehost(java.lang.String remotehost)
String) parameter.
remotehost - The remotehost (String) parameter.getRemotehost()public void setRemoteport(int remoteport)
int) parameter.
remoteport - The remoteport (int) parameter.getRemoteport()protected void setSocket(java.net.DatagramSocket socket)
java.net.DatagramSocket).
socket - The socket (DatagramSocket) parameter.createSocket(),
getSocket()public void setup()
User defined properties and default values.
| udptransport.remotehost | |
| udptransport.remoteport | |
| udptransport.localhost | |
| udptransport.localport | |
| udptransport.packetsize | |
| retrytime | DEFAULT_RETRY_TIME |
| noactivitytimeout | DEFAULT_NO_ACTIVITY_TIMEOUT |
setup in class TransportTransport.setup()
public void write(byte[] sendBytes)
throws java.lang.Exception
byte[]) parameter.
write in interface TransportServicewrite in class TransportsendBytes - The send bytes (byte[]) parameter.
java.lang.ExceptionTransport.write(MessageService)
|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||