Sun SPOT API
Green Release  


com.sun.squawk.io
Class ServerConnectionHandler

java.lang.Object
  extended by com.sun.squawk.io.ServerConnectionHandler

public abstract class ServerConnectionHandler
extends Object

This interface defines the call back interface for kernel mode Java device drivers.

Author:
Nik Shaylor

Constructor Summary
ServerConnectionHandler(String name)
          Creates a new ServerConnectionHandler.
 
Method Summary
 String getConnectionName()
          Returns a name of the connection.
static ServerConnectionHandler lookup(ServerConnectionHandler sch, String name)
          Searches a list of ServerConnectionHandlers for a handler whose name matches a given string.
abstract  void processConnection(StreamConnection con)
          Processes an incoming connection.
 void processServerMessage()
          Causes the pending server message to be processed.
 void setNext(ServerConnectionHandler next)
          Sets the next field of the ServerConnectionHandler
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerConnectionHandler

public ServerConnectionHandler(String name)
Creates a new ServerConnectionHandler.

Parameters:
name - the name of the message stream being processed
Method Detail

setNext

public void setNext(ServerConnectionHandler next)
Sets the next field of the ServerConnectionHandler

Parameters:
next - the next ServerConnectionHandler

getConnectionName

public String getConnectionName()
Returns a name of the connection.

Returns:
the name of the message stream being processed

processServerMessage

public void processServerMessage()
                          throws IOException
Causes the pending server message to be processed.

Throws:
IOException

lookup

public static ServerConnectionHandler lookup(ServerConnectionHandler sch,
                                             String name)
Searches a list of ServerConnectionHandlers for a handler whose name matches a given string.

Parameters:
sch - the handler to start searching from
name - the string to match
Returns:
the ServerConnectionHandler whose name matches name or null if there isn't one

processConnection

public abstract void processConnection(StreamConnection con)
Processes an incoming connection.

Parameters:
con - the incoming connection

Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.