org.apache.coyote.memory

Class MemoryProtocolHandler

Implemented Interfaces:
ProtocolHandler

public class MemoryProtocolHandler
extends java.lang.Object
implements ProtocolHandler

Abstract the protocol implementation, including threading, etc. Processor is single threaded and specific to stream-based protocols, will not fit Jk protocols like JNI.

Author:
Remy Maucherat

Nested Class Summary

protected class
MemoryProtocolHandler.ByteChunkInputBuffer
protected class
MemoryProtocolHandler.ByteChunkOutputBuffer

Field Summary

protected Adapter
adapter
Associated adapter.

Method Summary

void
destroy()
Adapter
getAdapter()
Object
getAttribute(String name)
void
init()
Init the protocol.
void
pause()
void
process(Request request, ByteChunk input, Response response, ByteChunk output)
Process specified request.
void
resume()
void
setAdapter(Adapter adapter)
The adapter, used to call the connector.
void
setAttribute(String name, Object value)
Pass config info.
void
start()
Start the protocol.

Field Details

adapter

protected Adapter adapter
Associated adapter.

Method Details

destroy

public void destroy()
            throws Exception
Specified by:
destroy in interface ProtocolHandler


getAdapter

public Adapter getAdapter()
Specified by:
getAdapter in interface ProtocolHandler


getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface ProtocolHandler


init

public void init()
            throws Exception
Init the protocol.
Specified by:
init in interface ProtocolHandler


pause

public void pause()
            throws Exception
Specified by:
pause in interface ProtocolHandler


process

public void process(Request request,
                    ByteChunk input,
                    Response response,
                    ByteChunk output)
            throws Exception
Process specified request.


resume

public void resume()
            throws Exception
Specified by:
resume in interface ProtocolHandler


setAdapter

public void setAdapter(Adapter adapter)
The adapter, used to call the connector.
Specified by:
setAdapter in interface ProtocolHandler


setAttribute

public void setAttribute(String name,
                         Object value)
Pass config info.
Specified by:
setAttribute in interface ProtocolHandler


start

public void start()
            throws Exception
Start the protocol.
Specified by:
start in interface ProtocolHandler


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.