org.walluck.oscar
Class AIMFrame

java.lang.Object
  extended byorg.walluck.oscar.AIMFrame

public class AIMFrame
extends java.lang.Object

A frame is an object holding all of the underlying layers: FLAP, SNAC, and ICQPacket.

Since:
1.0
Version:
1.0
Author:
David Walluck

Constructor Summary
AIMFrame()
          Creates a new empty frame.
AIMFrame(AIMConnection conn, ICQPacket icqPacket, AIMOutputStream buffer)
          Creates a new Frame from an ICQ packet.
AIMFrame(AIMConnection conn, int type, AIMInputStream buffer)
          Creates a new incoming frame.
AIMFrame(AIMConnection conn, int type, FLAP flap, SNAC snac, AIMOutputStream buffer)
          Creates a new outgoing frame.
 
Method Summary
 AIMConnection getConn()
          Get the value of conn.
 byte[] getData()
          Get the value of data.
 FLAP getFLAP()
          Get the value of flap.
 ICQPacket getICQPacket()
          Get the value of icqPacket.
 int getLength()
          Get the value of length.
 SNAC getSNAC()
          Get the value os snac.
 int getType()
          Get the value of type.
 boolean isHandled()
          Get the value of handled.
 void setConn(AIMConnection conn)
          Set the value of conn.
 void setData(byte[] data)
          Set the value of data.
 void setFLAP(FLAP flap)
          Set the value of flap.
 void setHandled(boolean handled)
          Set the value of handled.
 void setICQPacket(ICQPacket icqPacket)
          Set the value of icqPacket.
 void setLength(int length)
          Set the value of length.
 void setSNAC(SNAC snac)
          Set the value of snac.
 void setType(int type)
          Set the value of type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AIMFrame

public AIMFrame()
Creates a new empty frame.


AIMFrame

public AIMFrame(AIMConnection conn,
                ICQPacket icqPacket,
                AIMOutputStream buffer)
         throws java.io.IOException
Creates a new Frame from an ICQ packet.

Parameters:
conn - the connection
icqPacket - the ICQ packet
buffer - the buffer
Throws:
java.io.IOException - if an error occurs

AIMFrame

public AIMFrame(AIMConnection conn,
                int type,
                AIMInputStream buffer)
         throws java.io.IOException
Creates a new incoming frame.

Parameters:
conn - the connection this frame is coming in on
type - the type of frame
buffer - the incoming buffer
Throws:
java.io.IOException - if an error occurs

AIMFrame

public AIMFrame(AIMConnection conn,
                int type,
                FLAP flap,
                SNAC snac,
                AIMOutputStream buffer)
         throws java.io.IOException
Creates a new outgoing frame.

Parameters:
conn - the connection this frame is going out on
type - the type of connection (AIMConstants.AIM_FRAMETYPE_FLAP only)
flap - the outgoing FLAP
snac - the outgoing SNAC
buffer - the outgoing buffer
Throws:
java.io.IOException - if an error occurs
See Also:
AIMConstants
Method Detail

getConn

public AIMConnection getConn()
Get the value of conn.

Returns:
value of conn.

setConn

public void setConn(AIMConnection conn)
Set the value of conn.

Parameters:
conn - Value to assign to conn.

getType

public int getType()
Get the value of type.

Returns:
value of type.

setType

public void setType(int type)
Set the value of type.

Parameters:
type - Value to assign to type.

getData

public byte[] getData()
Get the value of data.

Returns:
value of data.

setData

public void setData(byte[] data)
Set the value of data.

Parameters:
data - Value to assign to data.

isHandled

public boolean isHandled()
Get the value of handled.

Returns:
value of handled.

setHandled

public void setHandled(boolean handled)
Set the value of handled.

Parameters:
handled - Value to assign to handled.

getFLAP

public FLAP getFLAP()
Get the value of flap.

Returns:
value of flap.

setFLAP

public void setFLAP(FLAP flap)
Set the value of flap.

Parameters:
flap - Value to assign to flap.

getSNAC

public SNAC getSNAC()
Get the value os snac.

Returns:
value of snac.

setSNAC

public void setSNAC(SNAC snac)
Set the value of snac.

Parameters:
snac - Value to assign to snac.

getLength

public int getLength()
Get the value of length.

Returns:
value of length.

setLength

public void setLength(int length)
Set the value of length.

Parameters:
length - Value to assign to length.

getICQPacket

public ICQPacket getICQPacket()
Get the value of icqPacket.

Returns:
value of icqPacket.

setICQPacket

public void setICQPacket(ICQPacket icqPacket)
Set the value of icqPacket.

Parameters:
icqPacket - Value to assign to icqPacket.