jcifs.util.transport
Class Transport
java.lang.Object
jcifs.util.transport.Transport
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- SmbTransport
public abstract class Transport
- extends Object
- implements Runnable
This class simplifies communication for protocols that support
multiplexing requests. It encapsulates a stream and some protocol
knowledge (provided by a concrete subclass) so that connecting,
disconnecting, sending, and receiving can be syncronized
properly. Apparatus is provided to send and receive requests
concurrently.
response_map
protected HashMap response_map
Transport
public Transport()
readn
public static int readn(InputStream in,
byte[] b,
int off,
int len)
throws IOException
- Throws:
IOException
makeKey
protected abstract void makeKey(Request request)
throws IOException
- Throws:
IOException
peekKey
protected abstract Request peekKey()
throws IOException
- Throws:
IOException
doSend
protected abstract void doSend(Request request)
throws IOException
- Throws:
IOException
doRecv
protected abstract void doRecv(Response response)
throws IOException
- Throws:
IOException
doSkip
protected abstract void doSkip()
throws IOException
- Throws:
IOException
sendrecv
public void sendrecv(Request request,
Response response,
long timeout)
throws IOException
- Throws:
IOException
doConnect
protected abstract void doConnect()
throws Exception
- Throws:
Exception
doDisconnect
protected abstract void doDisconnect(boolean hard)
throws IOException
- Throws:
IOException
connect
public void connect(long timeout)
throws TransportException
- Throws:
TransportException
disconnect
public void disconnect(boolean hard)
throws IOException
- Throws:
IOException
run
public void run()
- Specified by:
run in interface Runnable
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2012. All Rights Reserved.