TM Service Discovery
Release 2.0

org.eclipse.tm.discovery.transport
Interface ITransport


public interface ITransport

Interface for service discovery transports


Method Summary
 String receive(byte[] packet)
          Handles receiving data
 void send(byte[] packet)
          Handles sending data
 void setTargetAddress(String address)
          Sets the address of the target, depending on the implementation (IP, port...)
 void setTimeOut(int timeOut)
          Sets the timeout for the transport implementation.
 

Method Detail

send

void send(byte[] packet)
          throws IOException
Handles sending data

Parameters:
packet - Data packet to be sent.
Throws:
IOException

receive

String receive(byte[] packet)
               throws IOException
Handles receiving data

Parameters:
packet - Packet to be filled with the reply data.
Returns:
Address of the replying device.
Throws:
IOException

setTargetAddress

void setTargetAddress(String address)
                      throws Exception
Sets the address of the target, depending on the implementation (IP, port...)

Parameters:
address - Address or identifier of the target.
Throws:
Exception

setTimeOut

void setTimeOut(int timeOut)
                throws Exception
Sets the timeout for the transport implementation.

Parameters:
timeOut - The timeout in milliseconds
Throws:
Exception

TM Service Discovery
Release 2.0

Copyright (c) 2007 Symbian Software Ltd. and others. All Rights Reserved.