| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private String | |
| public static final int | DEFAULT_PORT
The default port to use for the PG server. |
| private boolean | |
| private boolean | |
| private String | |
| private String | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | PG_TYPE_VARCHAR
The VARCHAR type. |
| public static final int | |
| private final AtomicInteger | |
| private int | |
| private boolean | |
| private final Set | |
| private ServerSocket | |
| private boolean | |
| private boolean | |
| private final HashSet | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| public String | Returns: the database namethe key to test (or database name if no key is used) db)If no key is set, return the original database name. |
| pack-priv void | |
| public static int | Returns: the PostgreSQL typethe SQL type type)Convert the SQL type to a PostgreSQL type |
| public static String | Returns: the name of the given typethe PostgreSQL type oid pgType)Returns the name of the given type. |
| public boolean | getAllowOthers()
Implements org. Check if remote connections are allowed. |
| pack-priv String | |
| pack-priv boolean | |
| public String | |
| public int | |
| pack-priv PgServerThread | |
| pack-priv boolean | |
| public String | getType()
Implements org. Get the human readable short name of the service. |
| pack-priv HashSet | |
| public String | getURL()
Implements org. Get the URL of this service in a human readable form |
| public void | init(String...
the command line options args)Implements org. Initialize the service from command line options. |
| public boolean | |
| public boolean | isRunning(boolean
if errors should be written traceError)Implements org. Check if the service is running. |
| public void | |
| pack-priv synchronized void | |
| public void | |
| public void | |
| pack-priv void | |
| pack-priv void |
| allowOthers | back to summary |
|---|---|
| private boolean allowOthers | |
| baseDir | back to summary |
|---|---|
| private String baseDir | |
| DEFAULT_PORT | back to summary |
|---|---|
| public static final int DEFAULT_PORT The default port to use for the PG server. This value is also in the documentation and in the Server javadoc. | |
| ifExists | back to summary |
|---|---|
| private boolean ifExists | |
| isDaemon | back to summary |
|---|---|
| private boolean isDaemon | |
| key | back to summary |
|---|---|
| private String key | |
| keyDatabase | back to summary |
|---|---|
| private String keyDatabase | |
| PG_TYPE_BOOL | back to summary |
|---|---|
| public static final int PG_TYPE_BOOL | |
| PG_TYPE_BPCHAR | back to summary |
|---|---|
| public static final int PG_TYPE_BPCHAR | |
| PG_TYPE_BYTEA | back to summary |
|---|---|
| public static final int PG_TYPE_BYTEA | |
| PG_TYPE_DATE | back to summary |
|---|---|
| public static final int PG_TYPE_DATE | |
| PG_TYPE_FLOAT4 | back to summary |
|---|---|
| public static final int PG_TYPE_FLOAT4 | |
| PG_TYPE_FLOAT8 | back to summary |
|---|---|
| public static final int PG_TYPE_FLOAT8 | |
| PG_TYPE_INT2 | back to summary |
|---|---|
| public static final int PG_TYPE_INT2 | |
| PG_TYPE_INT2_ARRAY | back to summary |
|---|---|
| public static final int PG_TYPE_INT2_ARRAY | |
| PG_TYPE_INT4 | back to summary |
|---|---|
| public static final int PG_TYPE_INT4 | |
| PG_TYPE_INT4_ARRAY | back to summary |
|---|---|
| public static final int PG_TYPE_INT4_ARRAY | |
| PG_TYPE_INT8 | back to summary |
|---|---|
| public static final int PG_TYPE_INT8 | |
| PG_TYPE_NUMERIC | back to summary |
|---|---|
| public static final int PG_TYPE_NUMERIC | |
| PG_TYPE_TEXT | back to summary |
|---|---|
| public static final int PG_TYPE_TEXT | |
| PG_TYPE_TIME | back to summary |
|---|---|
| public static final int PG_TYPE_TIME | |
| PG_TYPE_TIMESTAMP | back to summary |
|---|---|
| public static final int PG_TYPE_TIMESTAMP | |
| PG_TYPE_TIMESTAMPTZ | back to summary |
|---|---|
| public static final int PG_TYPE_TIMESTAMPTZ | |
| PG_TYPE_TIMETZ | back to summary |
|---|---|
| public static final int PG_TYPE_TIMETZ | |
| PG_TYPE_UNKNOWN | back to summary |
|---|---|
| public static final int PG_TYPE_UNKNOWN | |
| PG_TYPE_VARCHAR | back to summary |
|---|---|
| public static final int PG_TYPE_VARCHAR The VARCHAR type. | |
| PG_TYPE_VARCHAR_ARRAY | back to summary |
|---|---|
| public static final int PG_TYPE_VARCHAR_ARRAY | |
| pid | back to summary |
|---|---|
| private final AtomicInteger pid | |
| port | back to summary |
|---|---|
| private int port | |
| portIsSet | back to summary |
|---|---|
| private boolean portIsSet | |
| running | back to summary |
|---|---|
| private final Set<PgServerThread> running | |
| serverSocket | back to summary |
|---|---|
| private ServerSocket serverSocket | |
| stop | back to summary |
|---|---|
| private boolean stop | |
| trace | back to summary |
|---|---|
| private boolean trace | |
| typeSet | back to summary |
|---|---|
| private final HashSet<Integer> typeSet | |
| virtualThreads | back to summary |
|---|---|
| private boolean virtualThreads | |
| PgServer | back to summary |
|---|---|
| public PgServer() | |
| allow | back to summary |
|---|---|
| private boolean allow(Socket socket) | |
| checkKeyAndGetDatabaseName | back to summary |
|---|---|
| public String checkKeyAndGetDatabaseName(String db) If no key is set, return the original database name. If a key is set, check if the key matches. If yes, return the correct database name. If not, throw an exception.
| |
| checkType | back to summary |
|---|---|
| pack-priv void checkType(int type) Check whether a data type is supported. A warning is logged if not.
| |
| convertType | back to summary |
|---|---|
| public static int convertType(TypeInfo type) Convert the SQL type to a PostgreSQL type
| |
| formatType | back to summary |
|---|---|
| public static String formatType(int pgType) Returns the name of the given type.
| |
| getAllowOthers | back to summary |
|---|---|
| public boolean getAllowOthers() Implements org. Doc from org. Check if remote connections are allowed.
| |
| getBaseDir | back to summary |
|---|---|
| pack-priv String getBaseDir() | |
| getIfExists | back to summary |
|---|---|
| pack-priv boolean getIfExists() | |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. Get the human readable name of the service. | |
| getPort | back to summary |
|---|---|
| public int getPort() Implements org. Doc from org. Gets the port this service is listening on.
| |
| getThread | back to summary |
|---|---|
| pack-priv PgServerThread getThread(int processId) Get the thread with the given process id.
| |
| getTrace | back to summary |
|---|---|
| pack-priv boolean getTrace() | |
| getType | back to summary |
|---|---|
| public String getType() Implements org. Doc from org. Get the human readable short name of the service. | |
| getTypeSet | back to summary |
|---|---|
| pack-priv HashSet Get the type hash set. | |
| getURL | back to summary |
|---|---|
| public String getURL() Implements org. Doc from org. Get the URL of this service in a human readable form | |
| init | back to summary |
|---|---|
| public void init(String... args) Implements org. Doc from org. Initialize the service from command line options. | |
| isDaemon | back to summary |
|---|---|
| public boolean isDaemon() Implements org. Doc from org. Check if a daemon thread should be used.
| |
| isRunning | back to summary |
|---|---|
| public boolean isRunning(boolean traceError) Implements org. Doc from org. Check if the service is running.
| |
| listen | back to summary |
|---|---|
| public void listen() Implements org. Doc from org. Listen for incoming connections. This method blocks.
| |
| remove | back to summary |
|---|---|
| pack-priv synchronized void remove(PgServerThread t) Remove a thread from the list.
| |
| start | back to summary |
|---|---|
| public void start() Implements org. Doc from org. Start the service. This usually means create the server socket. This method must not block.
| |
| stop | back to summary |
|---|---|
| public void stop() Implements org. Doc from org. Stop the service.
| |
| trace | back to summary |
|---|---|
| pack-priv void trace(String s) Print a message if the trace flag is enabled.
| |
| traceError | back to summary |
|---|---|
| pack-priv void traceError(Exception e) Print the stack trace if the trace flag is enabled.
| |