public class Slaves extends Object implements JSONSerializable
Constructor and Description |
---|
Slaves() |
Modifier and Type | Method and Description |
---|---|
boolean |
addSlave(Slave slave) |
void |
close() |
void |
fromJSON(net.sf.json.JSONObject json) |
Connection |
getConnection() |
int |
getSalvesSize() |
Slave |
getSlave(int index) |
static void |
main(String[] args) |
void |
open() |
static Slaves |
readJsonStream(InputStream is) |
boolean |
removeSlave(Slave slave) |
void |
setConnection(Connection conn) |
int |
slaveIndexOf(Slave s) |
net.sf.json.JSONObject |
toJSON(JsonSerializeType jsonSerializeType) |
void |
writeJsonStream(OutputStream os) |
public static Slaves readJsonStream(InputStream is) throws IOException
IOException
public net.sf.json.JSONObject toJSON(JsonSerializeType jsonSerializeType)
toJSON
in interface JSONSerializable
public void fromJSON(net.sf.json.JSONObject json)
fromJSON
in interface JSONSerializable
public int getSalvesSize()
public Slave getSlave(int index)
public void writeJsonStream(OutputStream os) throws UnsupportedEncodingException, IOException
public Connection getConnection()
public void setConnection(Connection conn)
public boolean addSlave(Slave slave)
public boolean removeSlave(Slave slave)
public void close() throws InterruptedException, IOException
InterruptedException
IOException
public void open() throws IOException
IOException
public int slaveIndexOf(Slave s)
Copyright © 2009–2014 MBus4J. All rights reserved.