bluetooth
Class StrategoServer

java.lang.Object
  extended by bluetooth.GestionBt
      extended by bluetooth.StrategoServer
All Implemented Interfaces:
java.lang.Runnable

public class StrategoServer
extends GestionBt
implements java.lang.Runnable

Gère le serveur bluetooth


Field Summary
private  javax.microedition.io.StreamConnectionNotifier _SCNotifier
           
private  boolean isInit
           
private  javax.bluetooth.LocalDevice localDevice
           
private static java.lang.String serverUrl
           
private  java.lang.Thread thread
           
 
Fields inherited from class bluetooth.GestionBt
_SConnection, input, output, stratego
 
Constructor Summary
StrategoServer(Stratego stratego)
          Constructeur
 
Method Summary
 void envoyerCoupJoue(Case cD, Case cA)
          Envoie le coup joue grâce à un OutputStream
 void envoyerPlateau()
          Envoie les données du plateau
 void fermetureFlux()
          Ferme les flux d'entrée et de sortie
 javax.microedition.io.StreamConnection get_SConnection()
           
 java.io.InputStream getInput()
           
 java.io.OutputStream getOutput()
           
 void lirePlateau()
          Récupère les données du plateau
private  void ouvertureFlux()
          Ouvre les flux d'entrée et de sortie
 void run()
          Exécute le thread
 
Methods inherited from class bluetooth.GestionBt
envoyerCoupJoue, lireCoupJoue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_SCNotifier

private javax.microedition.io.StreamConnectionNotifier _SCNotifier

localDevice

private javax.bluetooth.LocalDevice localDevice

thread

private java.lang.Thread thread

isInit

private boolean isInit

serverUrl

private static java.lang.String serverUrl
Constructor Detail

StrategoServer

public StrategoServer(Stratego stratego)
Constructeur

Parameters:
stratego - instance du stratego
Method Detail

run

public void run()
Exécute le thread

Specified by:
run in interface java.lang.Runnable

ouvertureFlux

private void ouvertureFlux()
Ouvre les flux d'entrée et de sortie


fermetureFlux

public void fermetureFlux()
Ferme les flux d'entrée et de sortie


envoyerPlateau

public void envoyerPlateau()
Envoie les données du plateau


lirePlateau

public void lirePlateau()
Récupère les données du plateau


envoyerCoupJoue

public void envoyerCoupJoue(Case cD,
                            Case cA)
Envoie le coup joue grâce à un OutputStream

Parameters:
cD - case de départ
cA - case d'arrivée

get_SConnection

public javax.microedition.io.StreamConnection get_SConnection()

getOutput

public java.io.OutputStream getOutput()

getInput

public java.io.InputStream getInput()