net.anidb.udp
Class UdpCharacterFactory

java.lang.Object
  extended by net.anidb.udp.UdpCharacterFactory

public class UdpCharacterFactory
extends java.lang.Object

A factory for Character objects.

Version:
1.0, 28.12.2009
Author:
grizzlyxp (http://anidb.net/perl-bin/animedb.pl?show=userpage&uid=63935)

Method Summary
 Character getCharacter(long characterId)
          Returns the character with the given character Id.
static UdpCharacterFactory getInstance(UdpConnection conn)
          Returns an instance of this class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UdpCharacterFactory getInstance(UdpConnection conn)
Returns an instance of this class.

Parameters:
conn - The connection.
Returns:
The instance.
Throws:
java.lang.IllegalArgumentException - If the connection is null.

getCharacter

public Character getCharacter(long characterId)
                       throws UdpConnectionException,
                              AniDbException
Returns the character with the given character Id.

Parameters:
characterId - The character Id.
Returns:
The character.
Throws:
UdpConnectionException - If a connection problem occured.
AniDbException - If a problem with AniDB occured.
See Also:
UdpReturnCodes.NO_SUCH_CHARACTER