de.netseeker.ejoe
Class ConnectionHeader

java.lang.Object
  extended byde.netseeker.ejoe.ConnectionHeader
All Implemented Interfaces:
java.io.Serializable

public final class ConnectionHeader
extends java.lang.Object
implements java.io.Serializable

A simple connection header contining informations about compression and blocking/non-blocking io features.

Author:
netseeker
See Also:
Serialized Form

Constructor Summary
ConnectionHeader()
           
ConnectionHeader(java.nio.channels.SelectableChannel channel)
           
ConnectionHeader(java.nio.channels.SelectableChannel channel, byte header)
           
 
Method Summary
 void fromBytes(byte header)
           
 java.lang.String getAdapterName()
           
 java.lang.Object getAttachment()
           
 java.nio.channels.SelectableChannel getChannel()
           
 int getCompressionLevel()
           
 java.nio.ByteBuffer getWaitingBuffer()
           
 boolean hasAttachment()
           
 boolean hasCompression()
           
 boolean hasNonBlockingReadWrite()
           
 boolean hasWaitingBuffer()
           
 boolean isConnected()
           
 boolean isPersistent()
           
 void releaseAttachment()
           
 void releaseWaitingBuffer()
           
 void setAdapterName(java.lang.String name)
           
 void setAttachment(java.lang.Object attachment)
           
 void setChannel(java.nio.channels.SelectableChannel channel)
           
 void setCompression(boolean enable)
           
 void setCompressionLevel(int level)
           
 void setConnected(boolean enable)
           
 void setNonBlockingReadWrite(boolean enable)
           
 void setPersistent(boolean enable)
           
 void setWaitingBuffer(java.nio.ByteBuffer buf)
           
 byte toByte()
           
 java.nio.ByteBuffer toByteBuffer()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionHeader

public ConnectionHeader()

ConnectionHeader

public ConnectionHeader(java.nio.channels.SelectableChannel channel)
Parameters:
channel -

ConnectionHeader

public ConnectionHeader(java.nio.channels.SelectableChannel channel,
                        byte header)
Parameters:
channel -
header -
Method Detail

hasCompression

public boolean hasCompression()

setCompression

public void setCompression(boolean enable)

setCompressionLevel

public void setCompressionLevel(int level)

getCompressionLevel

public int getCompressionLevel()

hasNonBlockingReadWrite

public boolean hasNonBlockingReadWrite()

setNonBlockingReadWrite

public void setNonBlockingReadWrite(boolean enable)

isConnected

public boolean isConnected()

setConnected

public void setConnected(boolean enable)

isPersistent

public boolean isPersistent()

setPersistent

public void setPersistent(boolean enable)

hasWaitingBuffer

public boolean hasWaitingBuffer()

getWaitingBuffer

public java.nio.ByteBuffer getWaitingBuffer()

setWaitingBuffer

public void setWaitingBuffer(java.nio.ByteBuffer buf)

releaseWaitingBuffer

public void releaseWaitingBuffer()

hasAttachment

public boolean hasAttachment()

setAttachment

public void setAttachment(java.lang.Object attachment)

getAttachment

public java.lang.Object getAttachment()

releaseAttachment

public void releaseAttachment()

setChannel

public void setChannel(java.nio.channels.SelectableChannel channel)

getChannel

public java.nio.channels.SelectableChannel getChannel()

setAdapterName

public void setAdapterName(java.lang.String name)

getAdapterName

public java.lang.String getAdapterName()

toByte

public byte toByte()

fromBytes

public void fromBytes(byte header)

toString

public java.lang.String toString()

toByteBuffer

public java.nio.ByteBuffer toByteBuffer()


Copyright © 2005-2006 netseeker. All Rights Reserved.