public class PipeProtocol extends Protocol
This class is used for sending packets through a local named pipe to the SmartInspect Console. It is used when the 'pipe' protocol is specified in the connections string. Please see the isValidOption method for a list of available protocol options. Please note that this protocol can only be used for local connections. For remote connections to other machines, please use TcpProtocol.
The public members of this class are threadsafe.
fConnected| Constructor and Description |
|---|
PipeProtocol()
Creates and initializes a PipeProtocol instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildOptions(ConnectionsBuilder builder)
Overridden.
|
protected String |
getName()
Overridden.
|
protected void |
internalConnect()
This method tries to establish a connection to a local named
pipe of a SmartInspect Console.
|
protected void |
internalDisconnect()
Overridden.
|
protected void |
internalWritePacket(Packet packet)
Overridden.
|
protected boolean |
isValidOption(String name)
Overridden.
|
protected void |
loadOptions()
Overridden.
|
addListener, composeLogHeaderPacket, connect, disconnect, dispatch, dispose, doError, failed, getAppName, getAsyncEnabledDefaultValue, getAsyncQueueDefaultValue, getBooleanOption, getBytesOption, getCaption, getHostName, getIntegerOption, getLevelOption, getReconnectDefaultValue, getRotateOption, getSizeOption, getStringOption, getTimespanOption, handleException, implConnect, implDisconnect, implDispatch, implWritePacket, initialize, internalDispatch, internalReconnect, internalWriteLogHeader, isAsynchronous, removeListener, reset, scheduleWritePacket, setAppName, setHostName, writePacketpublic PipeProtocol()
protected String getName()
protected boolean isValidOption(String name)
The following table lists all valid options, their default values and descriptions for the pipe protocol.
| Valid Options | Default Value | Description |
|---|---|---|
| pipename | "smartinspect" | Specifies the named pipe for sending log packets to the SmartInspect Console. |
For further options which affect the behavior of this
protocol, please have a look at the documentation of the
Protocol.isValidOption(java.lang.String) method of the
parent class.
Example:
SiAuto.Si.setConnections("pipe()");
SiAuto.Si.setConnections("pipe(pipename=\\"logging\\")");
isValidOption in class Protocolname - The option name to validate.protected void buildOptions(ConnectionsBuilder builder)
buildOptions in class Protocolbuilder - The ConnectionsBuilder object to fill with the current options
of this protocolprotected void loadOptions()
This method loads all relevant options and ensures their correctness. See isValidOption for a list of options which are recognized by the pipe protocol.
loadOptions in class Protocolprotected void internalConnect()
throws Exception
Overridden. Connects to the specified local named pipe.
internalConnect in class ProtocolException - if establishing the named pipe connection failedprotected void internalWritePacket(Packet packet) throws Exception
internalWritePacket in class Protocolpacket - The packet to writeException - if sending the packet to the Console failedprotected void internalDisconnect()
throws Exception
This method closes the named pipe handle if previously created and disposes any supplemental objects.
internalDisconnect in class ProtocolException - If closing the named pipe handle failedCopyright © 2023. All rights reserved.