You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-57Lines changed: 51 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
-
ONCRPC4J
2
-
========
1
+
# ONCRPC4J
3
2
4
3
This is a part of dCache.ORG's NFSv4.1 work.
5
4
@@ -11,11 +10,9 @@ minimal changes.
11
10
12
11
The library supports *IPv6*, *RPCSEC_GSS* and compliant with [rfc1831](http://www.ietf.org/rfc/rfc1831.txt) and [rfc2203](http://www.ietf.org/rfc/rfc2203.txt).
13
12
13
+
## There are several options how to use *ONCRPC4J* in your application
14
14
15
-
### There are several options how to use *ONCRPC4J* in your application:###
16
-
17
-
Embedding service into an application
18
-
-------------------------------------
15
+
### Embedding service into an application
19
16
20
17
```java
21
18
packageme.mypackage;
@@ -56,7 +53,7 @@ public class Svcd {
56
53
}
57
54
```
58
55
59
-
###or as a spring bean###
56
+
###or as a spring bean
60
57
61
58
```java
62
59
packageme.mypackage;
@@ -115,13 +112,11 @@ public class Svcd implements RpcDispatchable {
115
112
116
113
Notice, that included *SpringRunner* will try to instantiate and run bean with id __oncrpcsvc__.
With version 3.0.0 a new package schema is introduced. As the change is not backward compatible with older
127
122
version some minimal code changes are required.
@@ -146,12 +141,12 @@ org.dcache.xdr.GrizzlyXdrTransport => into org.dcache.oncrpc4j.grizzly.GrizzlyRp
146
141
147
142
org.dcache.xdr.XdrBuffer is removed. Use org.dcache.oncrpc4j.xdr.Xdr.
148
143
149
-
### Behavoir change ###
144
+
### Behavior change
150
145
151
146
The Xdr#xdrEncodeByteBuffer changed to not flip provided byte buffer. As a result, the Xdr#xdrEncodeByteBuffer
152
147
will encode data in the buffer from buffers current position up to the limit:
153
148
154
-
```
149
+
```java
155
150
ButeByffer buffer =...;
156
151
Xdr xdr =...;
157
152
@@ -160,9 +155,7 @@ buffer.flip();
160
155
xdr.xdrEncodeByteBuffer(buffer);
161
156
```
162
157
163
-
164
-
Using RPCGEN to generate client and server stubs
165
-
------------------------------------------------
158
+
## Using RPCGEN to generate client and server stubs
166
159
167
160
Assume a service which calculates a the length of a string. It provides a single remote call *strlen* which takes a string as an argument ans returns it's length. Let describe that procedure according XDR language specification:
168
161
@@ -174,11 +167,13 @@ program STRLEN {
174
167
} = 1;
175
168
} = 117;
176
169
```
170
+
177
171
Here we define *STRLEN* program number to be *117* and version number *1*. Now we can generate stub files for client and server:
0 commit comments