Skip to content

Commit 08b2e9e

Browse files
committed
Change to use SrvSession<?> parameters
1 parent ff168ed commit 08b2e9e

3 files changed

Lines changed: 35 additions & 35 deletions

File tree

src/main/java/org/filesys/server/core/DeviceInterface.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ public DeviceContext createContext(String shareName, ConfigElement args)
5050
* @param sess Server session
5151
* @param tree Tree connection
5252
*/
53-
public void treeOpened(SrvSession sess, TreeConnection tree);
53+
public void treeOpened(SrvSession<?> sess, TreeConnection tree);
5454

5555
/**
5656
* Connection closed to this device
5757
*
5858
* @param sess Server session
5959
* @param tree Tree connection
6060
*/
61-
public void treeClosed(SrvSession sess, TreeConnection tree);
61+
public void treeClosed(SrvSession<?> sess, TreeConnection tree);
6262
}

src/main/java/org/filesys/server/filesys/DiskInterface.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public interface DiskInterface extends DeviceInterface {
4242
* @param param Network file context.
4343
* @throws java.io.IOException If an error occurs.
4444
*/
45-
public void closeFile(SrvSession sess, TreeConnection tree, NetworkFile param)
45+
public void closeFile(SrvSession<?> sess, TreeConnection tree, NetworkFile param)
4646
throws java.io.IOException;
4747

4848
/**
@@ -53,7 +53,7 @@ public void closeFile(SrvSession sess, TreeConnection tree, NetworkFile param)
5353
* @param params Directory create parameters
5454
* @throws java.io.IOException If an error occurs.
5555
*/
56-
public void createDirectory(SrvSession sess, TreeConnection tree, FileOpenParams params)
56+
public void createDirectory(SrvSession<?> sess, TreeConnection tree, FileOpenParams params)
5757
throws java.io.IOException;
5858

5959
/**
@@ -65,7 +65,7 @@ public void createDirectory(SrvSession sess, TreeConnection tree, FileOpenParams
6565
* @return NetworkFile
6666
* @throws java.io.IOException If an error occurs.
6767
*/
68-
public NetworkFile createFile(SrvSession sess, TreeConnection tree, FileOpenParams params)
68+
public NetworkFile createFile(SrvSession<?> sess, TreeConnection tree, FileOpenParams params)
6969
throws java.io.IOException;
7070

7171
/**
@@ -76,7 +76,7 @@ public NetworkFile createFile(SrvSession sess, TreeConnection tree, FileOpenPara
7676
* @param dir Directory name.
7777
* @throws java.io.IOException If an error occurs.
7878
*/
79-
public void deleteDirectory(SrvSession sess, TreeConnection tree, String dir)
79+
public void deleteDirectory(SrvSession<?> sess, TreeConnection tree, String dir)
8080
throws java.io.IOException;
8181

8282
/**
@@ -87,7 +87,7 @@ public void deleteDirectory(SrvSession sess, TreeConnection tree, String dir)
8787
* @param name File name
8888
* @throws java.io.IOException If an error occurs.
8989
*/
90-
public void deleteFile(SrvSession sess, TreeConnection tree, String name)
90+
public void deleteFile(SrvSession<?> sess, TreeConnection tree, String name)
9191
throws java.io.IOException;
9292

9393
/**
@@ -99,7 +99,7 @@ public void deleteFile(SrvSession sess, TreeConnection tree, String name)
9999
* @return FileStatus
100100
* @see FileStatus
101101
*/
102-
FileStatus fileExists(SrvSession sess, TreeConnection tree, String name);
102+
FileStatus fileExists(SrvSession<?> sess, TreeConnection tree, String name);
103103

104104
/**
105105
* Flush any buffered output for the specified file.
@@ -109,7 +109,7 @@ public void deleteFile(SrvSession sess, TreeConnection tree, String name)
109109
* @param file Network file context.
110110
* @throws java.io.IOException If an error occurs.
111111
*/
112-
public void flushFile(SrvSession sess, TreeConnection tree, NetworkFile file)
112+
public void flushFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file)
113113
throws java.io.IOException;
114114

115115
/**
@@ -121,7 +121,7 @@ public void flushFile(SrvSession sess, TreeConnection tree, NetworkFile file)
121121
* @return File information if valid, else null
122122
* @throws java.io.IOException If an error occurs.
123123
*/
124-
public FileInfo getFileInformation(SrvSession sess, TreeConnection tree, String name)
124+
public FileInfo getFileInformation(SrvSession<?> sess, TreeConnection tree, String name)
125125
throws java.io.IOException;
126126

127127
/**
@@ -132,7 +132,7 @@ public FileInfo getFileInformation(SrvSession sess, TreeConnection tree, String
132132
* @return boolean
133133
* @throws java.io.IOException If an error occurs.
134134
*/
135-
boolean isReadOnly(SrvSession sess, DeviceContext ctx)
135+
boolean isReadOnly(SrvSession<?> sess, DeviceContext ctx)
136136
throws java.io.IOException;
137137

138138
/**
@@ -144,7 +144,7 @@ boolean isReadOnly(SrvSession sess, DeviceContext ctx)
144144
* @return NetworkFile
145145
* @throws java.io.IOException If an error occurs.
146146
*/
147-
public NetworkFile openFile(SrvSession sess, TreeConnection tree, FileOpenParams params)
147+
public NetworkFile openFile(SrvSession<?> sess, TreeConnection tree, FileOpenParams params)
148148
throws java.io.IOException;
149149

150150
/**
@@ -160,7 +160,7 @@ public NetworkFile openFile(SrvSession sess, TreeConnection tree, FileOpenParams
160160
* @return Number of bytes read
161161
* @throws java.io.IOException If an error occurs.
162162
*/
163-
public int readFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufPos, int siz, long filePos)
163+
public int readFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufPos, int siz, long filePos)
164164
throws java.io.IOException;
165165

166166
/**
@@ -173,7 +173,7 @@ public int readFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte
173173
* @param netFile NetworkFile for handle based rename, or null for path based rename
174174
* @throws java.io.IOException If an error occurs.
175175
*/
176-
public void renameFile(SrvSession sess, TreeConnection tree, String oldName, String newName, NetworkFile netFile)
176+
public void renameFile(SrvSession<?> sess, TreeConnection tree, String oldName, String newName, NetworkFile netFile)
177177
throws java.io.IOException;
178178

179179
/**
@@ -187,7 +187,7 @@ public void renameFile(SrvSession sess, TreeConnection tree, String oldName, Str
187187
* @return New file position, relative to the start of file.
188188
* @throws java.io.IOException If an error occurs.
189189
*/
190-
long seekFile(SrvSession sess, TreeConnection tree, NetworkFile file, long pos, int typ)
190+
long seekFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file, long pos, int typ)
191191
throws java.io.IOException;
192192

193193
/**
@@ -199,7 +199,7 @@ long seekFile(SrvSession sess, TreeConnection tree, NetworkFile file, long pos,
199199
* @param info FileInfo
200200
* @throws java.io.IOException If an error occurs.
201201
*/
202-
public void setFileInformation(SrvSession sess, TreeConnection tree, String name, FileInfo info)
202+
public void setFileInformation(SrvSession<?> sess, TreeConnection tree, String name, FileInfo info)
203203
throws java.io.IOException;
204204

205205
/**
@@ -226,7 +226,7 @@ public SearchContext startSearch(SrvSession sess, TreeConnection tree, String se
226226
* @param siz New file length
227227
* @throws java.io.IOException If an error occurs.
228228
*/
229-
public void truncateFile(SrvSession sess, TreeConnection tree, NetworkFile file, long siz)
229+
public void truncateFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file, long siz)
230230
throws java.io.IOException;
231231

232232
/**
@@ -242,7 +242,7 @@ public void truncateFile(SrvSession sess, TreeConnection tree, NetworkFile file,
242242
* @return Number of bytes actually written
243243
* @throws java.io.IOException If an error occurs.
244244
*/
245-
public int writeFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufoff, int siz,
245+
public int writeFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufoff, int siz,
246246
long fileoff)
247247
throws java.io.IOException;
248248
}

src/main/java/org/filesys/smb/server/disk/original/JavaFileDiskDriver.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ protected FileInfo buildFileInformation(String path, String relPath) {
161161
* @param file Network file details
162162
* @exception IOException I/O error
163163
*/
164-
public void closeFile(SrvSession sess, TreeConnection tree, NetworkFile file)
164+
public void closeFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file)
165165
throws IOException {
166166

167167
// Close the file
@@ -186,7 +186,7 @@ public void closeFile(SrvSession sess, TreeConnection tree, NetworkFile file)
186186
* @param params Directory parameters
187187
* @exception IOException I/O error
188188
*/
189-
public void createDirectory(SrvSession sess, TreeConnection tree, FileOpenParams params)
189+
public void createDirectory(SrvSession<?> sess, TreeConnection tree, FileOpenParams params)
190190
throws IOException {
191191

192192
// Get the full path for the new directory
@@ -207,7 +207,7 @@ public void createDirectory(SrvSession sess, TreeConnection tree, FileOpenParams
207207
* @return NetworkFile
208208
* @exception IOException I/O error
209209
*/
210-
public NetworkFile createFile(SrvSession sess, TreeConnection tree, FileOpenParams params)
210+
public NetworkFile createFile(SrvSession<?> sess, TreeConnection tree, FileOpenParams params)
211211
throws IOException {
212212

213213
// Get the full path for the new file
@@ -241,7 +241,7 @@ public NetworkFile createFile(SrvSession sess, TreeConnection tree, FileOpenPara
241241
* @param dir Path of directory to delete
242242
* @exception IOException I/O error
243243
*/
244-
public void deleteDirectory(SrvSession sess, TreeConnection tree, String dir)
244+
public void deleteDirectory(SrvSession<?> sess, TreeConnection tree, String dir)
245245
throws IOException {
246246

247247
// Get the full path for the directory
@@ -292,7 +292,7 @@ else if (delDir.exists() == false) {
292292
* @param name Name of file to delete
293293
* @exception IOException I/O error
294294
*/
295-
public void deleteFile(SrvSession sess, TreeConnection tree, String name)
295+
public void deleteFile(SrvSession<?> sess, TreeConnection tree, String name)
296296
throws IOException {
297297

298298
// Get the full path for the file
@@ -327,7 +327,7 @@ else if (delFile.exists() == false) {
327327
* @param name File name
328328
* @return FileStatus
329329
*/
330-
public FileStatus fileExists(SrvSession sess, TreeConnection tree, String name) {
330+
public FileStatus fileExists(SrvSession<?> sess, TreeConnection tree, String name) {
331331

332332
// Get the full path for the file
333333
DeviceContext ctx = tree.getContext();
@@ -380,7 +380,7 @@ public FileStatus fileExists(SrvSession sess, TreeConnection tree, String name)
380380
* @param file Network file
381381
* @exception IOException I/O error
382382
*/
383-
public void flushFile(SrvSession sess, TreeConnection tree, NetworkFile file)
383+
public void flushFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file)
384384
throws IOException {
385385

386386
// Flush the file
@@ -396,7 +396,7 @@ public void flushFile(SrvSession sess, TreeConnection tree, NetworkFile file)
396396
* @return SMBFileInfo
397397
* @exception IOException I/O error
398398
*/
399-
public FileInfo getFileInformation(SrvSession sess, TreeConnection tree, String name)
399+
public FileInfo getFileInformation(SrvSession<?> sess, TreeConnection tree, String name)
400400
throws IOException {
401401

402402
// Get the full path for the file/directory
@@ -426,7 +426,7 @@ public FileInfo getFileInformation(SrvSession sess, TreeConnection tree, String
426426
* @return true if the device is read-only, else false
427427
* @throws IOException If an error occurs.
428428
*/
429-
public boolean isReadOnly(SrvSession sess, DeviceContext ctx)
429+
public boolean isReadOnly(SrvSession<?> sess, DeviceContext ctx)
430430
throws IOException {
431431

432432
// Check if the directory exists, and it is a directory
@@ -718,7 +718,7 @@ public NetworkFile openFile(SrvSession sess, TreeConnection tree, FileOpenParams
718718
* @return Number of bytes read
719719
* @exception IOException I/O error
720720
*/
721-
public int readFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufPos, int siz, long filePos)
721+
public int readFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufPos, int siz, long filePos)
722722
throws IOException {
723723

724724
// Check if the file is a directory
@@ -746,7 +746,7 @@ public int readFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte
746746
* @param netFile NetworkFile for handle based rename, or null for path based rename
747747
* @exception IOException I/O error
748748
*/
749-
public void renameFile(SrvSession sess, TreeConnection tree, String oldName, String newName, NetworkFile netFile)
749+
public void renameFile(SrvSession<?> sess, TreeConnection tree, String oldName, String newName, NetworkFile netFile)
750750
throws IOException {
751751

752752
// Get the full path for the existing file and the new file name
@@ -781,7 +781,7 @@ public void renameFile(SrvSession sess, TreeConnection tree, String oldName, Str
781781
* @return New file position
782782
* @exception IOException I/O error
783783
*/
784-
public long seekFile(SrvSession sess, TreeConnection tree, NetworkFile file, long pos, int typ)
784+
public long seekFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file, long pos, int typ)
785785
throws IOException {
786786

787787
// Check that the network file is our type
@@ -797,7 +797,7 @@ public long seekFile(SrvSession sess, TreeConnection tree, NetworkFile file, lon
797797
* @param info File information to be set
798798
* @exception IOException I/O error
799799
*/
800-
public void setFileInformation(SrvSession sess, TreeConnection tree, String name, FileInfo info)
800+
public void setFileInformation(SrvSession<?> sess, TreeConnection tree, String name, FileInfo info)
801801
throws IOException {
802802

803803
// Check if the modify date/time should be updated
@@ -865,7 +865,7 @@ public SearchContext startSearch(SrvSession sess, TreeConnection tree, String se
865865
* @param siz New file length
866866
* @exception IOException I/O error
867867
*/
868-
public void truncateFile(SrvSession sess, TreeConnection tree, NetworkFile file, long siz)
868+
public void truncateFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file, long siz)
869869
throws IOException {
870870

871871
// Truncate or extend the file
@@ -885,7 +885,7 @@ public void truncateFile(SrvSession sess, TreeConnection tree, NetworkFile file,
885885
* @param fileoff Offset within the file to start writing the data
886886
* @exception IOException I/O error
887887
*/
888-
public int writeFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufoff, int siz, long fileoff)
888+
public int writeFile(SrvSession<?> sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufoff, int siz, long fileoff)
889889
throws IOException {
890890

891891
// Check if the file is a directory
@@ -946,7 +946,7 @@ public DeviceContext createContext(String shareName, ConfigElement args)
946946
* @param sess Server session
947947
* @param tree Tree connection
948948
*/
949-
public void treeOpened(SrvSession sess, TreeConnection tree) {
949+
public void treeOpened(SrvSession<?> sess, TreeConnection tree) {
950950
}
951951

952952
/**
@@ -955,7 +955,7 @@ public void treeOpened(SrvSession sess, TreeConnection tree) {
955955
* @param sess Server session
956956
* @param tree Tree connection
957957
*/
958-
public void treeClosed(SrvSession sess, TreeConnection tree) {
958+
public void treeClosed(SrvSession<?> sess, TreeConnection tree) {
959959
}
960960

961961
/**

0 commit comments

Comments
 (0)