org.bdware.doip.cluster.StaticContentIrpClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doip-audit-tool Show documentation
Show all versions of doip-audit-tool Show documentation
doip audit tool developed by bdware
The newest version!
package org.bdware.doip.cluster;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.bdware.irp.client.IrpClient;
import org.bdware.irp.exception.IrpClientException;
import org.bdware.irp.irplib.core.IrpMessageSigner;
import org.bdware.irp.irplib.exception.IrpConnectException;
import org.bdware.irp.stateinfo.StateInfoBase;
import java.io.Reader;
import java.util.List;
public class StaticContentIrpClient implements IrpClient {
JsonObject content;
public StaticContentIrpClient(JsonObject content) {
this.content = content;
}
public StaticContentIrpClient(Reader reader) {
content = JsonParser.parseReader(reader).getAsJsonObject();
}
@Override
public StateInfoBase resolve(String handle) throws IrpClientException {
StateInfoBase base = new StateInfoBase();
base.identifier = handle;
base.handleValues = content;
return base;
}
@Override
public String register(StateInfoBase hr) throws IrpClientException {
return null;
}
@Override
public String reRegister(StateInfoBase hr) throws IrpClientException {
return null;
}
@Override
public String unRegister(String handle) throws IrpClientException {
return handle;
}
@Override
public List batchRegister(StateInfoBase hr, int count) throws IrpClientException {
return null;
}
@Override
public void close() {
}
@Override
public void connect(String url) {
}
@Override
public void connect(String clientID, String LHSUrl, IrpMessageSigner signer) {
}
@Override
public void reconnect() throws IrpConnectException {
}
@Override
public boolean isConnected() {
return true;
}
}