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
IOExceptionpublic net.sf.json.JSONObject toJSON(JsonSerializeType jsonSerializeType)
toJSON in interface JSONSerializablepublic void fromJSON(net.sf.json.JSONObject json)
fromJSON in interface JSONSerializablepublic 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
InterruptedExceptionIOExceptionpublic void open()
throws IOException
IOExceptionpublic int slaveIndexOf(Slave s)
Copyright © 2009–2016 MBus4J. All rights reserved.