|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.synapse.transport.pipe.EndDelimitedProtocol
public class EndDelimitedProtocol
End delimited protocol implementation.
In the end delimited protocol datagrams are encapsulated in the stream without modification. After each datagram an end byte is appended. Since datagrams may contain arbitrary byte sequences and no escape algorithm is defined, this protocol is only suitable if it can be assumed that the end byte never appears inside a datagram.
This protocol implementation is mainly useful with legacy protocols.
For example, in conjunction with PipeListener
and
SyslogMessageBuilder
it can be
used to receive syslog events via a UNIX pipe. In this case the end byte
is 10.
This protocol recognizes a single mandatory parameter delimiter that must be configured in the transport and that specifies the end byte. The value must be given as an integer. An example transport receiver configuration looks like:
<transportReceiver name="pipe" class="org.apache.synapse.transport.pipe.PipeListener"> <parameter name="protocol">org.apache.synapse.transport.pipe.EndDelimitedProtocol</parameter> <parameter name="delimiter">10</parameter> </transportReceiver>
Constructor Summary | |
---|---|
EndDelimitedProtocol()
|
Method Summary | |
---|---|
ProtocolDecoder |
createProtocolDecoder()
Create a new protocol decoder for this protocol implementation. |
byte |
getDelimiter()
|
void |
init(ParameterInclude paramInclude)
Initialize this protocol implementation using a given set of parameters. |
void |
setDelimiter(byte delimiter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EndDelimitedProtocol()
Method Detail |
---|
public void init(ParameterInclude paramInclude) throws AxisFault
Protocol
init
in interface Protocol
paramInclude
- the set of parameters to use
AxisFault
- if the protocol implementation failed to initializepublic byte getDelimiter()
public void setDelimiter(byte delimiter)
public ProtocolDecoder createProtocolDecoder()
Protocol
createProtocolDecoder
in interface Protocol
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |