Package com.hierynomus.smbj.share
Class PipeShare
- java.lang.Object
-
- com.hierynomus.smbj.share.Share
-
- com.hierynomus.smbj.share.PipeShare
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class PipeShare extends Share
-
-
Field Summary
-
Fields inherited from class com.hierynomus.smbj.share.Share
session, smbPath, treeConnect
-
-
Constructor Summary
Constructors Constructor Description PipeShare(SmbPath smbPath, TreeConnect treeConnect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeFileId(SMB2FileId fileId)
NamedPipe
open(java.lang.String name, SMB2ImpersonationLevel impersonationLevel, java.util.Set<AccessMask> accessMask, java.util.Set<FileAttributes> attributes, java.util.Set<SMB2ShareAccess> shareAccesses, SMB2CreateDisposition createDisposition, java.util.Set<SMB2CreateOptions> createOptions)
SMB2FileId
openFileId(java.lang.String name, SMB2ImpersonationLevel impersonationLevel, java.util.Set<AccessMask> accessMask, java.util.Set<FileAttributes> fileAttributes, java.util.Set<SMB2ShareAccess> shareAccess, SMB2CreateDisposition createDisposition, java.util.Set<SMB2CreateOptions> createOptions)
boolean
waitForPipe(java.lang.String name)
Requests that the server wait until an instance of the specified named pipe is available for connection.boolean
waitForPipe(java.lang.String name, long timeout, java.util.concurrent.TimeUnit timeoutUnit)
Requests that the server wait until an instance of the specified named pipe is available for connection.-
Methods inherited from class com.hierynomus.smbj.share.Share
close, equals, getCreateStatusHandler, getSmbPath, getTreeConnect, hashCode, ioctl, ioctl, ioctl, ioctlAsync, isConnected
-
-
-
-
Constructor Detail
-
PipeShare
public PipeShare(SmbPath smbPath, TreeConnect treeConnect)
-
-
Method Detail
-
waitForPipe
public boolean waitForPipe(java.lang.String name)
Requests that the server wait until an instance of the specified named pipe is available for connection.Name must not include the "\pipe\", so if the operation was on \\server\pipe\pipename, the name would be "pipename".
This method requests that the server wait indefinitely. To specify a maximum wait time use
waitForPipe(String, long, TimeUnit)
.- Parameters:
name
- the name of the named pipe.- Returns:
- true if an instance of the pipe is available; false if a timeout occurred
- Throws:
SMBApiException
- if an error occurs while waiting for an instance of the pipe to become available
-
waitForPipe
public boolean waitForPipe(java.lang.String name, long timeout, java.util.concurrent.TimeUnit timeoutUnit)
Requests that the server wait until an instance of the specified named pipe is available for connection.Name must not include the "\pipe\", so if the operation was on \\server\pipe\pipename, the name would be "pipename".
- Parameters:
name
- the name of the named pipe.timeout
- the amount of time to wait until an instance is availabletimeoutUnit
- the unit in which timeout is specified- Returns:
- true if an instance of the pipe is available; false if a timeout occurred
- Throws:
SMBApiException
- if an error occurs while waiting for an instance of the pipe to become available
-
open
public NamedPipe open(java.lang.String name, SMB2ImpersonationLevel impersonationLevel, java.util.Set<AccessMask> accessMask, java.util.Set<FileAttributes> attributes, java.util.Set<SMB2ShareAccess> shareAccesses, SMB2CreateDisposition createDisposition, java.util.Set<SMB2CreateOptions> createOptions)
-
openFileId
public SMB2FileId openFileId(java.lang.String name, SMB2ImpersonationLevel impersonationLevel, java.util.Set<AccessMask> accessMask, java.util.Set<FileAttributes> fileAttributes, java.util.Set<SMB2ShareAccess> shareAccess, SMB2CreateDisposition createDisposition, java.util.Set<SMB2CreateOptions> createOptions)
-
closeFileId
public void closeFileId(SMB2FileId fileId) throws SMBApiException
- Throws:
SMBApiException
-
-