uka.psp
Class PSPServer.Connection
java.lang.Object
uka.psp.PSPServer.Connection
- Enclosing class:
- PSPServer
- public static final class PSPServer.Connection
- extends java.lang.Object
|
Method Summary |
void |
close()
|
PSPServer.Connection.Input |
getInputStream()
|
int |
getNodePortNr()
|
PSPServer.Connection.Output |
getOutputStream()
Note: The streams returned by
getInputStream() and
getOutputStream() do not conform exactly to
the specification of Java streams. |
int |
getPeerNodeID()
|
int |
getPeerPortNr()
|
PSP.Port |
internalGetPort()
|
int |
receive(boolean[] buffer,
int offset,
int length)
|
int |
receive(byte[] buffer,
int offset,
int length)
|
int |
receive(char[] buffer,
int offset,
int length)
|
int |
receive(double[] buffer,
int offset,
int length)
|
int |
receive(float[] buffer,
int offset,
int length)
|
int |
receive(int[] buffer,
int offset,
int length)
|
int |
receive(long[] buffer,
int offset,
int length)
|
int |
receive(short[] buffer,
int offset,
int length)
|
void |
send(boolean[] buffer,
int offset,
int length)
|
void |
send(byte[] buffer,
int offset,
int length)
|
void |
send(char[] buffer,
int offset,
int length)
|
void |
send(double[] buffer,
int offset,
int length)
|
void |
send(float[] buffer,
int offset,
int length)
|
void |
send(int[] buffer,
int offset,
int length)
|
void |
send(long[] buffer,
int offset,
int length)
|
void |
send(short[] buffer,
int offset,
int length)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
port
private final PSP.Port port
toNode
private final int toNode
toPort
private final int toPort
in
private PSPServer.Connection.Input in
out
private PSPServer.Connection.Output out
PSPServer.Connection
PSPServer.Connection(int toNode,
int toPort,
PSP.Port port)
- See Also:
PSPServer.connect(int, int)
getNodePortNr
public int getNodePortNr()
getPeerNodeID
public int getPeerNodeID()
getPeerPortNr
public int getPeerPortNr()
internalGetPort
public PSP.Port internalGetPort()
send
public final void send(byte[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
receive
public final int receive(byte[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
send
public final void send(boolean[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
receive
public final int receive(boolean[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
send
public final void send(short[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
receive
public final int receive(short[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
send
public final void send(char[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
receive
public final int receive(char[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
send
public final void send(int[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
receive
public final int receive(int[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
send
public final void send(long[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
receive
public final int receive(long[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
send
public final void send(float[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
receive
public final int receive(float[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
send
public final void send(double[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
receive
public final int receive(double[] buffer,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
close
public final void close()
throws java.io.IOException
- Throws:
java.io.IOException
getOutputStream
public PSPServer.Connection.Output getOutputStream()
- Note: The streams returned by
getInputStream() and
getOutputStream() do not conform exactly to
the specification of Java streams. The stream layer is
implemented only as method name conversion layer over the
PSP message passing library therefore some restrictions
apply to the streams:
- the methods passing only a single byte
write(byte b) and int read()
are not implemented and throw an
UnsupportedOperationException. The reason is that the
Connection is not buffered and these methods can not
be implemented efficiently.
- The size of a message written in a call to
write() must always fit in the buffer
provided to the corresponding read()
call.
- There is no end-of-stream detection. Closing the
Connection on the sender side does not notify the
receiver of the end of stream condition. The
application always must close the connection on both
ends after the last write/read pair.
getInputStream
public PSPServer.Connection.Input getInputStream()
- See Also:
getOutputStream()