Package org.dogtagpki.tps
Class TPSConnection
- java.lang.Object
-
- org.dogtagpki.tps.TPSConnection
-
public class TPSConnection extends java.lang.Object- Author:
- Endi S. Dewata
-
-
Field Summary
Fields Modifier and Type Field Description booleanchunkedjava.io.InputStreaminstatic org.slf4j.Loggerloggerstatic intMAX_MESSAGE_SIZE_DEFAULTjava.io.PrintStreamout
-
Constructor Summary
Constructors Constructor Description TPSConnection(java.io.InputStream in, java.io.OutputStream out)TPSConnection(java.io.InputStream in, java.io.OutputStream out, boolean chunked)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intgetMaxMessageSize()Getter for static variable maxMessageSize.TPSMessageread()static voidsetMaxMessageSize(int maxSize)Setter for static variable maxMessageSize.voidwrite(TPSMessage message)
-
-
-
Field Detail
-
MAX_MESSAGE_SIZE_DEFAULT
public static final int MAX_MESSAGE_SIZE_DEFAULT
- See Also:
- Constant Field Values
-
logger
public static org.slf4j.Logger logger
-
in
public java.io.InputStream in
-
out
public java.io.PrintStream out
-
chunked
public boolean chunked
-
-
Method Detail
-
read
public TPSMessage read() throws java.io.IOException
- Throws:
java.io.IOException
-
write
public void write(TPSMessage message) throws java.io.IOException
- Throws:
java.io.IOException
-
getMaxMessageSize
public static int getMaxMessageSize()
Getter for static variable maxMessageSize.- Returns:
- maxMessageSize
-
setMaxMessageSize
public static void setMaxMessageSize(int maxSize)
Setter for static variable maxMessageSize. This variable places a limit on the value (and thus, length) of the first parameter of an incoming stream of data. For example, incoming data conforms to the following format: "s=(message length here)&". TPSConnection will read one character (typically 's', but can be any char), and will expect the second character to be an '='. The following characters until the '&' are interpreted as the messageSize. This number cannot be larger than maxMessageSize.- Parameters:
maxSize-
-
-