SunSPOT API V5.0


com.sun.squawk.io.j2me.radiogram
Class Protocol

java.lang.Object
  extended by com.sun.squawk.io.ConnectionBase
      extended by com.sun.squawk.io.j2me.radiogram.Protocol
All Implemented Interfaces:
Connection

public class Protocol
extends ConnectionBase

This class provides the "radiogram" protocol for accessing the SPOT radio using datagrams. It is an implementor of RadiogramConnection

See Also:
RadiogramConnection

Constructor Summary
Protocol()
          Default constructor - normally not called by user code which should use the GCF framework instead.
 
Method Summary
 void close()
          Close
 Connection open(String protocolName, String name, int mode, boolean timeouts)
          Open a connection to a target.
 
Methods inherited from class com.sun.squawk.io.ConnectionBase
openDataInputStream, openDataOutputStream, openInputStream, openOutputStream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Protocol

public Protocol()
Default constructor - normally not called by user code which should use the GCF framework instead. See class comment for examples.

Method Detail

open

public Connection open(String protocolName,
                       String name,
                       int mode,
                       boolean timeouts)
Description copied from class: ConnectionBase
Open a connection to a target.

Specified by:
open in class ConnectionBase
Parameters:
protocolName - The URL protocol
name - The URL for the connection
mode - The access mode
timeouts - A flag to indicate that the caller wants timeout exceptions
Returns:
A new Connection object

close

public void close()
           throws IOException
Description copied from class: ConnectionBase
Close

Specified by:
close in interface Connection
Overrides:
close in class ConnectionBase
Throws:
IOException - If an I/O error occurs

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.