| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final InputStream | |
| private LoggerContext | |
| private Logger | |
| private final Socket |
| Access | Constructor and Description |
|---|---|
| public | RemoteAppenderStreamClient(String
a display name for the client id, Socket input stream from which events will be read socket)Constructs a new client. |
| public | RemoteAppenderStreamClient(String
a display name for the client id, InputStream input stream from which events will be read inputStream)Constructs a new client. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements ch. |
| private HardenedObjectInputStream | |
| public void | |
| public void | setLoggerContext(LoggerContext
the logger context to set lc)Implements ch. |
| public String |
| id | back to summary |
|---|---|
| private final String id | |
| inputStream | back to summary |
|---|---|
| private final InputStream inputStream | |
| lc | back to summary |
|---|---|
| private LoggerContext lc | |
| logger | back to summary |
|---|---|
| private Logger logger | |
| socket | back to summary |
|---|---|
| private final Socket socket | |
| RemoteAppenderStreamClient | back to summary |
|---|---|
| public RemoteAppenderStreamClient(String id, Socket socket) Constructs a new client. | |
| RemoteAppenderStreamClient | back to summary |
|---|---|
| public RemoteAppenderStreamClient(String id, InputStream inputStream) Constructs a new client. This constructor is provided primarily to support unit tests for which it is inconvenient to create a socket.
| |
| close | back to summary |
|---|---|
| public void close() Implements ch. Doc from ch. Closes any resources that are held by the client.
Note that (as described in Doug Lea's discussion about interrupting I/O
operations in "Concurrent Programming in Java" - Addison-Wesley Professional,
2nd edition, 1999) this method is used to interrupt any blocked I/O operation
in the client when the server is shutting down. The client implementation
must anticipate this potential, and gracefully exit when the blocked I/O
operation throws the relevant
Note also, that unlike | |
| createObjectInputStream | back to summary |
|---|---|
| private HardenedObjectInputStream createObjectInputStream() throws IOException | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |
| setLoggerContext | back to summary |
|---|---|
| public void setLoggerContext(LoggerContext lc) Implements ch. Doc from ch. Sets the client's logger context. This provides the local logging context to the client's service thread, and is used as the destination for logging events received from the client.
This method must be invoked before the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |