Commit 852dc4dd authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

rpc: keep code style consistent.

parent 682566d3
......@@ -27,27 +27,27 @@ import org.dcache.xdr.XdrEncodingStream;
*/
public class DataBodyPrivacy implements XdrAble {
byte[] data;
byte[] _data;
public DataBodyPrivacy() {
}
public DataBodyPrivacy(byte[] data) {
this.data = data;
this._data = data;
}
@Override
public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
data = xdr.xdrDecodeDynamicOpaque();
_data = xdr.xdrDecodeDynamicOpaque();
}
@Override
public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException {
xdr.xdrEncodeDynamicOpaque(data);
xdr.xdrEncodeDynamicOpaque(_data);
}
public byte[] getData() {
return data;
return _data;
}
}
......@@ -27,29 +27,29 @@ import org.dcache.xdr.XdrEncodingStream;
*/
public class GSSINITargs implements XdrAble {
private byte[] token;
private byte[] _token;
public byte[] getToken() {
return token;
return _token;
}
public void setToken(byte[] token) {
this.token = token;
this._token = token;
}
public GSSINITargs() {
}
public GSSINITargs(byte[] token) {
this.token = token;
this._token = token;
}
public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
token = xdr.xdrDecodeDynamicOpaque();
_token = xdr.xdrDecodeDynamicOpaque();
}
public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException {
xdr.xdrEncodeDynamicOpaque(token);
xdr.xdrEncodeDynamicOpaque(_token);
}
}
......@@ -28,66 +28,66 @@ import org.dcache.xdr.XdrEncodingStream;
*/
public class GSSINITres implements XdrAble {
private byte[] handle;
private int gssMajor;
private int gssMinor;
private int sequence;
private byte[] token;
private byte[] _handle;
private int _gssMajor;
private int _gssMinor;
private int _sequence;
private byte[] _token;
public int getGssMajor() {
return gssMajor;
return _gssMajor;
}
public void setGssMajor(int gssMajor) {
this.gssMajor = gssMajor;
this._gssMajor = gssMajor;
}
public int getGssMinor() {
return gssMinor;
return _gssMinor;
}
public void setGssMinor(int gssMinor) {
this.gssMinor = gssMinor;
this._gssMinor = gssMinor;
}
public byte[] getHandle() {
return handle;
return _handle;
}
public void setHandle(byte[] handle) {
this.handle = handle;
this._handle = handle;
}
public int getSequence() {
return sequence;
return _sequence;
}
public void setSequence(int sequence) {
this.sequence = sequence;
this._sequence = sequence;
}
public byte[] getToken() {
return token;
return _token;
}
public void setToken(byte[] token) {
this.token = token;
this._token = token;
}
public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
handle = xdr.xdrDecodeDynamicOpaque();
gssMajor = xdr.xdrDecodeInt();
gssMinor = xdr.xdrDecodeInt();
sequence = xdr.xdrDecodeInt();
token = xdr.xdrDecodeDynamicOpaque();
_handle = xdr.xdrDecodeDynamicOpaque();
_gssMajor = xdr.xdrDecodeInt();
_gssMinor = xdr.xdrDecodeInt();
_sequence = xdr.xdrDecodeInt();
_token = xdr.xdrDecodeDynamicOpaque();
}
public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException {
xdr.xdrEncodeDynamicOpaque(handle);
xdr.xdrEncodeInt(gssMajor);
xdr.xdrEncodeInt(gssMinor);
xdr.xdrEncodeInt(sequence);
xdr.xdrEncodeDynamicOpaque(token);
xdr.xdrEncodeDynamicOpaque(_handle);
xdr.xdrEncodeInt(_gssMajor);
xdr.xdrEncodeInt(_gssMinor);
xdr.xdrEncodeInt(_sequence);
xdr.xdrEncodeDynamicOpaque(_token);
}
}
......@@ -64,7 +64,7 @@ public class RpcGssCall extends RpcCall {
super.retrieveCall(args);
break;
case RpcGssService.RPC_GSS_SVC_INTEGRITY:
DataBodyInteg integData = new DataBodyInteg();
DataBodyIntegrity integData = new DataBodyIntegrity();
super.retrieveCall(integData);
byte[] integBytes = integData.getData();
byte[] checksum = integData.getChecksum();
......@@ -117,7 +117,7 @@ public class RpcGssCall extends RpcCall {
b.get(integBytes);
byte[] checksum = _gssContext.getMIC(integBytes, 0, integBytes.length, _mop);
DataBodyInteg integData = new DataBodyInteg(integBytes, checksum);
DataBodyIntegrity integData = new DataBodyIntegrity(integBytes, checksum);
super.acceptedReply(state, integData);
break;
case RpcGssService.RPC_GSS_SVC_PRIVACY:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment