Commit 9d7b0b1a authored by Eric Tobias's avatar Eric Tobias
Browse files

Merge branch 'dev-nico' of http://git.list.lu/nui/tulip into dev-nico

parents 30b91fea ea049cf5
......@@ -16,5 +16,7 @@
<classpathentry exported="true" kind="lib" path="libs/tuio-1.4.jar" sourcepath="C:/Users/tobias/.m2/repository/net/sourceforge/tuio/tuio/1.4/tuio-1.4-sources.jar"/>
<classpathentry exported="true" kind="lib" path="libs/dbc.annotation.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="C:/Users/gilmard/Documents/Arduino/Adapter/xbee-api-0.9/lib/RXTXcomm.jar"/>
<classpathentry kind="lib" path="C:/Users/gilmard/Documents/Arduino/Adapter/bluecove-2.1.1-SNAPSHOT.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
/bin/
*.metadata
/dist
\ No newline at end of file
/dist
/bin/
/bin/
/bin/
/bin/
......@@ -55,7 +55,7 @@ cleanup.use_this_for_non_static_field_access_only_if_necessary=false
cleanup.use_this_for_non_static_method_access=true
cleanup.use_this_for_non_static_method_access_only_if_necessary=false
cleanup.use_type_arguments=false
cleanup_profile=_LIST
cleanup_profile=_CleanListME
cleanup_settings_version=2
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
......
......@@ -86,8 +86,8 @@ public class TangibleObjectBuilder {
* The Y coordinate
*/
public TangibleObjectBuilder(int objectId, Type type, float x, float y) {
this.type = type;
this.objectId = objectId;
this.type = type;
path.addElement(new Point(x, y, 0));
}
......@@ -99,7 +99,7 @@ public class TangibleObjectBuilder {
* The time since session start in seconds
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addSeconds(long seconds) {
public TangibleObjectBuilder withSeconds(long seconds) {
this.seconds = seconds;
return this;
}
......@@ -111,7 +111,7 @@ public class TangibleObjectBuilder {
* Time fraction in microseconds
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addMicroSeconds(long microSeconds) {
public TangibleObjectBuilder withMicroSeconds(long microSeconds) {
this.microSeconds = microSeconds;
return this;
}
......@@ -123,7 +123,7 @@ public class TangibleObjectBuilder {
* The X-axis velocity value.
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addxSpeed(float xSpeed) {
public TangibleObjectBuilder withxSpeed(float xSpeed) {
this.xSpeed = xSpeed;
return this;
}
......@@ -135,7 +135,7 @@ public class TangibleObjectBuilder {
* The Y-axis velocity value.
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addySpeed(float ySpeed) {
public TangibleObjectBuilder withySpeed(float ySpeed) {
this.ySpeed = ySpeed;
return this;
}
......@@ -147,7 +147,7 @@ public class TangibleObjectBuilder {
* The motion speed value.
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addMotionSpeed(float motionSpeed) {
public TangibleObjectBuilder withMotionSpeed(float motionSpeed) {
this.motionSpeed = motionSpeed;
return this;
}
......@@ -159,7 +159,7 @@ public class TangibleObjectBuilder {
* The motion acceleration value.
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addMotionAccel(float motionAccel) {
public TangibleObjectBuilder withMotionAccel(float motionAccel) {
this.motionAccel = motionAccel;
return this;
}
......@@ -171,7 +171,7 @@ public class TangibleObjectBuilder {
* The rotation speed value.
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addRotationSpeed(float rotationSpeed) {
public TangibleObjectBuilder withRotationSpeed(float rotationSpeed) {
this.rotationSpeed = rotationSpeed;
return this;
}
......@@ -183,7 +183,7 @@ public class TangibleObjectBuilder {
* The rotation acceleration value.
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addRotationAccel(float rotationAccel) {
public TangibleObjectBuilder withRotationAccel(float rotationAccel) {
this.rotationAccel = rotationAccel;
return this;
}
......@@ -196,7 +196,7 @@ public class TangibleObjectBuilder {
* object.
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addPath(Vector<Point> path) {
public TangibleObjectBuilder withPath(Vector<Point> path) {
this.path = path;
return this;
}
......@@ -208,16 +208,16 @@ public class TangibleObjectBuilder {
* Reflects the current state of the {@link TangibleObject}
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addState(State state) {
public TangibleObjectBuilder withState(State state) {
this.state = state;
return this;
}
/**
* @param state
* @return
* @return An instance of the builder for chain calling.
*/
public TangibleObjectBuilder addState(int state) {
public TangibleObjectBuilder withState(int state) {
this.state = State.getState(state);
return this;
}
......
......@@ -90,6 +90,9 @@ public abstract class TuiAdapter {
/**
* Method returning the {@link TangibleObject} (cursor) with the given id
*
* @param id
* of the cursor to get
*
* @return The {@link TangibleObject} with objectId = id.
*/
public abstract TangibleObject getCursor(long id);
......@@ -97,6 +100,9 @@ public abstract class TuiAdapter {
/**
* Method returning the {@link TangibleObject} (object) with the given id
*
* @param id
* of the object to get
*
* @return The {@link TangibleObject} with objectId = id.
*/
public abstract TangibleObject getObject(long id);
......
......@@ -72,6 +72,7 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
* @param objectManager
* The value to set objectManager to.
*/
@Override
public void setObjectManager(TangibleObjectManager objectManager) {
this.objectManager = objectManager;
}
......@@ -81,6 +82,7 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
*
* @return The value of objectManager.
*/
@Override
@Nullable
public TangibleObjectManager getObjectManager() {
return objectManager;
......@@ -118,15 +120,15 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
* @return tangibleObject with TuioObject values
*/
private TangibleObject convertTuioObjectToTangibleObject(TuioObject tangibleObject) {
Preconditions.checkArgument(tangibleObject != null, "The passed tangible cursor cannot be null!");
Preconditions.checkArgument(tangibleObject != null, "The passed tangible cursor cannot be null!"); //$NON-NLS-1$
Vector<Point> tempPath = new Vector<Point>();
Vector<Point> tempPath = new Vector<>();
for (TuioPoint point : tangibleObject.getPath()) {
Point temp = new Point(point.getX(), point.getY(), tangibleObject.getAngle());
tempPath.addElement(temp);
}
TangibleObject convertedTangibleObject = new TangibleObjectBuilder(tangibleObject.getSymbolID(), Type.OBJECT, tangibleObject.getPath().lastElement().getX(), tangibleObject.getPath().lastElement().getY()).addSeconds(tangibleObject.getTuioTime().getSeconds()).addMicroSeconds(tangibleObject.getTuioTime().getMicroseconds()).addxSpeed(tangibleObject.getXSpeed()).addySpeed(tangibleObject.getYSpeed()).addMotionSpeed(tangibleObject.getMotionSpeed()).addMotionAccel(tangibleObject.getMotionAccel()).addRotationSpeed(tangibleObject.getRotationSpeed()).addRotationAccel(tangibleObject.getRotationAccel()).addPath(tempPath).addState(tangibleObject.getTuioState()).build();
TangibleObject convertedTangibleObject = new TangibleObjectBuilder(tangibleObject.getSymbolID(), Type.OBJECT, tangibleObject.getPath().lastElement().getX(), tangibleObject.getPath().lastElement().getY()).withSeconds(tangibleObject.getTuioTime().getSeconds()).withMicroSeconds(tangibleObject.getTuioTime().getMicroseconds()).withxSpeed(tangibleObject.getXSpeed()).withySpeed(tangibleObject.getYSpeed()).withMotionSpeed(tangibleObject.getMotionSpeed()).withMotionAccel(tangibleObject.getMotionAccel()).withRotationSpeed(tangibleObject.getRotationSpeed()).withRotationAccel(tangibleObject.getRotationAccel()).withPath(tempPath).withState(tangibleObject.getTuioState()).build();
return convertedTangibleObject;
}
......@@ -140,15 +142,15 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
* @return tangibleObject with TuioCursor's values
*/
private TangibleObject convertTuioCursorToTangibleObject(TuioCursor tangibleCursor) {
Preconditions.checkArgument(tangibleCursor != null, "The passed tangible cursor cannot be null!");
Preconditions.checkArgument(tangibleCursor != null, "The passed tangible cursor cannot be null!"); //$NON-NLS-1$
Vector<Point> tempPath = new Vector<Point>();
Vector<Point> tempPath = new Vector<>();
for (TuioPoint point : tangibleCursor.getPath()) {
Point temp = new Point(point.getX(), point.getY(), 0);
tempPath.addElement(temp);
}
TangibleObject convertedTangibleObject = new TangibleObjectBuilder(IDMapper.remapCursorID(tangibleCursor.getCursorID()), Type.CURSOR, tangibleCursor.getPath().lastElement().getX(), tangibleCursor.getPath().lastElement().getY()).addSeconds(tangibleCursor.getTuioTime().getSeconds()).addMicroSeconds(tangibleCursor.getTuioTime().getMicroseconds()).addxSpeed(tangibleCursor.getXSpeed()).addySpeed(tangibleCursor.getYSpeed()).addMotionSpeed(tangibleCursor.getMotionSpeed()).addMotionAccel(tangibleCursor.getMotionAccel()).addPath(tempPath).addState(tangibleCursor.getTuioState()).build();
TangibleObject convertedTangibleObject = new TangibleObjectBuilder(IDMapper.remapCursorID(tangibleCursor.getCursorID()), Type.CURSOR, tangibleCursor.getPath().lastElement().getX(), tangibleCursor.getPath().lastElement().getY()).withSeconds(tangibleCursor.getTuioTime().getSeconds()).withMicroSeconds(tangibleCursor.getTuioTime().getMicroseconds()).withxSpeed(tangibleCursor.getXSpeed()).withySpeed(tangibleCursor.getYSpeed()).withMotionSpeed(tangibleCursor.getMotionSpeed()).withMotionAccel(tangibleCursor.getMotionAccel()).withPath(tempPath).withState(tangibleCursor.getTuioState()).build();
return convertedTangibleObject;
}
......@@ -163,7 +165,7 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
TangibleObject convertedTangibleObject = convertTuioCursorToTangibleObject(tangibleCursor);
super.addCurInfo(convertedTangibleObject, "down");
super.addCurInfo(convertedTangibleObject, "down"); //$NON-NLS-1$
objectManager.dropObject(convertedTangibleObject);
}
......@@ -174,11 +176,11 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
*/
@Override
public synchronized void addTuioObject(TuioObject tangibleObject) {
Preconditions.checkArgument(tangibleObject != null, "The passed tangible object cannot be null!");
Preconditions.checkArgument(tangibleObject != null, "The passed tangible object cannot be null!"); //$NON-NLS-1$
TangibleObject convertedTangibleObject = convertTuioObjectToTangibleObject(tangibleObject);
super.addObjInfo(convertedTangibleObject, "down");
super.addObjInfo(convertedTangibleObject, "down"); //$NON-NLS-1$
objectManager.dropObject(convertedTangibleObject);
......@@ -198,11 +200,11 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
*/
@Override
public synchronized void removeTuioCursor(TuioCursor tangibleCursor) {
Preconditions.checkArgument(tangibleCursor != null, "The passed tangible cursor cannot be null!");
Preconditions.checkArgument(tangibleCursor != null, "The passed tangible cursor cannot be null!"); //$NON-NLS-1$
TangibleObject convertedTangibleObject = convertTuioCursorToTangibleObject(tangibleCursor);
super.addCurInfo(convertedTangibleObject, "up");
super.addCurInfo(convertedTangibleObject, "up"); //$NON-NLS-1$
objectManager.liftObject(convertedTangibleObject);
}
......@@ -213,11 +215,11 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
*/
@Override
public synchronized void removeTuioObject(TuioObject tangibleObject) {
Preconditions.checkArgument(tangibleObject != null, "The passed tangible object cannot be null!");
Preconditions.checkArgument(tangibleObject != null, "The passed tangible object cannot be null!"); //$NON-NLS-1$
TangibleObject convertedTangibleObject = convertTuioObjectToTangibleObject(tangibleObject);
super.addObjInfo(convertedTangibleObject, "up");
super.addObjInfo(convertedTangibleObject, "up"); //$NON-NLS-1$
objectManager.liftObject(convertedTangibleObject);
......@@ -229,11 +231,11 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
*/
@Override
public synchronized void updateTuioCursor(TuioCursor tangibleCursor) {
Preconditions.checkArgument(tangibleCursor != null, "The passed tangible cursor cannot be null!");
Preconditions.checkArgument(tangibleCursor != null, "The passed tangible cursor cannot be null!"); //$NON-NLS-1$
TangibleObject convertedTangibleObject = convertTuioCursorToTangibleObject(tangibleCursor);
super.addCurInfo(convertedTangibleObject, "move");
super.addCurInfo(convertedTangibleObject, "move"); //$NON-NLS-1$
objectManager.updateObject(convertedTangibleObject);
}
......@@ -244,11 +246,11 @@ public class TuioConcreteAdapter extends TuiAdapter implements TuioListener {
*/
@Override
public synchronized void updateTuioObject(TuioObject tangibleObject) {
Preconditions.checkArgument(tangibleObject != null, "The passed tangible object cannot be null!");
Preconditions.checkArgument(tangibleObject != null, "The passed tangible object cannot be null!"); //$NON-NLS-1$
TangibleObject convertedTangibleObject = convertTuioObjectToTangibleObject(tangibleObject);
super.addObjInfo(convertedTangibleObject, "move");
super.addObjInfo(convertedTangibleObject, "move"); //$NON-NLS-1$
objectManager.updateObject(convertedTangibleObject);
......
/**
* Copyright Luxembourg Institute of Science and Technology, 2015. All rights reserved. If you wish
* to use this code for any purpose, please contact the author(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package lu.list.itis.dkd.tui.network.adapter;
import java.io.IOException;
import javax.bluetooth.DiscoveryAgent;
import javax.bluetooth.LocalDevice;
import javax.bluetooth.ServiceRecord;
import javax.bluetooth.UUID;
import javax.microedition.io.Connector;
import javax.microedition.io.StreamConnection;
/**
* Adapter class managing a communication over Bluetooth using {@link StreamConnection}.
*
* @author Nicolas GILMARD [nicolas.gilmard@list.lu]
* @since 1.0
* @version 1.0.0
*/
public class BluetoothClient extends ClientAdapter {
/**
* The StreamConnection which manage the communication
*/
protected StreamConnection client;
/**
* The service ID to connect
*/
protected String uuidService;
/**
* Default constructor
*
* @param uuidService
* != null
*/
public BluetoothClient(String uuidService) {
this.uuidService = uuidService;
}
/**
* {@inheritDoc}
*
* @throws IOException
*/
@Override
public void connect() throws IOException {
UUID SERVICE_ID = new UUID(uuidService, false);
DiscoveryAgent mDiscoveryAgent;
mDiscoveryAgent = LocalDevice.getLocalDevice().getDiscoveryAgent();
String mConnect = null;
mConnect = mDiscoveryAgent.selectService(SERVICE_ID, ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
if (mConnect != null) {
client = (StreamConnection) Connector.open(mConnect);
inputStream = client.openInputStream();
outputStream = client.openOutputStream();
}
}
/**
* {@inheritDoc}
*
* @throws IOException
*/
@Override
public void disconnect() throws IOException {
if (outputStream != null) {
outputStream.close();
}
if (inputStream != null) {
inputStream.close();
}
if (client != null) {
client.close();
}
}
}
/**
* Copyright Luxembourg Institute of Science and Technology, 2015. All rights reserved. If you wish
* to use this code for any purpose, please contact the author(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package lu.list.itis.dkd.tui.network.adapter;
import java.io.IOException;
import javax.bluetooth.DiscoveryAgent;
import javax.bluetooth.LocalDevice;
import javax.bluetooth.UUID;
import javax.microedition.io.Connector;
import javax.microedition.io.StreamConnection;
import javax.microedition.io.StreamConnectionNotifier;
/**
* Adapter class managing a communication over Bluetooth using {@link StreamConnectionNotifier} and
* {@link StreamConnection}.
*
* @author Nicolas GILMARD [nicolas.gilmard@list.lu]
* @since 1.0
* @version 1.0.0
*/
public class BluetoothServer extends ServerAdapter {
/**
* The StreamConnection which host the client connection
*/
protected StreamConnection client;
/**
* Listen for incoming connection
*/
protected StreamConnectionNotifier server;
/**
* The service ID to connect
*/
protected String uuidService;
/**
* Default constructor
*
* @param uuidService
* != null
* @throws IOException
*/
public BluetoothServer(String uuidService) throws IOException {
this.uuidService = uuidService;
UUID SERVICE_ID = new UUID(uuidService, false);
String url = "btspp://localhost:" + SERVICE_ID.toString() + ";name=service"; //$NON-NLS-1$ //$NON-NLS-2$
LocalDevice.getLocalDevice().setDiscoverable(DiscoveryAgent.GIAC);
server = (StreamConnectionNotifier) Connector.open(url);
}
/**
* {@inheritDoc}
*
* @throws IOException
*/
@Override
public void acceptClient() throws IOException {
client = server.acceptAndOpen();
inputStream = client.openInputStream();
outputStream = client.openOutputStream();
}
/**
* {@inheritDoc}
*
* @throws IOException
*/
@Override
public void closeServer() throws IOException {
// TODO Auto-generated method stub
if (outputStream != null) {
outputStream.close();
}
if (inputStream != null) {
inputStream.close();
}
if (client != null) {
client.close();
}
if (server != null) {
server.close();
}
LocalDevice.getLocalDevice().setDiscoverable(DiscoveryAgent.NOT_DISCOVERABLE);
}
/**
* {@inheritDoc}
*
* @throws IOException
*/
@Override
public void closeClient() throws IOException {
if (outputStream != null) {
outputStream.close();
}
if (inputStream != null) {
inputStream.close();
}
if (client != null) {
client.close();
}
}
}
/**
* Copyright Luxembourg Institute of Science to use this code for any purpose, please contact the
* author(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package lu.list.itis.dkd.tui.network.adapter;
import gnu.io.PortInUseException;
import gnu.io.UnsupportedCommOperationException;
import java.io.IOException;
import java.net.UnknownHostException;
/**
* Abstract class managing interaction between application and remote device
*
* @author Nicolas GILMARD [nicolas.gilmard@list.lu]
* @since 1.0
* @version 1.0.0
*/
public abstract class ClientAdapter extends NetworkAdapter {
/**
* Create a stream socket and connect it to a the specified server. Set the outputStream and
* inputStream.
*
* @throws IOException
* @throws UnknownHostException
* @throws PortInUseException
* @throws UnsupportedCommOperationException
*/
public abstract void connect() throws UnknownHostException, IOException, PortInUseException, UnsupportedCommOperationException;
/**
* Disconnect from the server. Close input/output streams and close connection.
*
* @throws IOException
*/
public abstract void disconnect() throws IOException;
}
/**
* Copyright Luxembourg Institute of Science and Technology, 2015. All rights reserved. If you wish
* to use this code for any purpose, please contact the author(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package lu.list.itis.dkd.tui.network.adapter;
import java.io.InputStream;
import java.io.OutputStream;
/**
* Abstract class managing communication between a tangible table and external device
*
* @author Nicolas GILMARD [nicolas.gilmard@list.lu]
* @since 1.0
* @version 1.0.0
*/
public abstract class NetworkAdapter {
/**
* Stream used for send information
*/
protected OutputStream outputStream;
/**
* Stream used for receive information
*/
protected InputStream inputStream;
/**