Milyn-Tinak Version 0.6.1

org.milyn.device.ident
Class IdentUnit

java.lang.Object
  extended byorg.milyn.device.ident.IdentUnit
Direct Known Subclasses:
HttpIdentUnit

public abstract class IdentUnit
extends java.lang.Object

Device identification data unit.

These are units of information which direct Tinak as to how a device should be identified e.g. a request header value to check for.

Author:
tfennelly
See Also:
HttpIdentUnit

Constructor Summary
IdentUnit()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Is the supplied object equal to this ident unit.
 java.lang.String getId()
          Get the ident unit id.
 java.lang.String getName()
          Get the ident unit name.
 java.lang.String getValue()
          Get the ident unit value.
abstract  boolean isMatch(Request request)
          Is this device identification unit a match for the device.
 void setId(java.lang.String id)
          Set the ident unit id.
 void setName(java.lang.String name)
          Set the ident unit name.
 void setValue(java.lang.String value)
          Set the ident unit value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentUnit

public IdentUnit()
Method Detail

setId

public void setId(java.lang.String id)
Set the ident unit id.

Parameters:
id - The id value.

getId

public java.lang.String getId()
Get the ident unit id.

Returns:
The id value.

setName

public void setName(java.lang.String name)
Set the ident unit name.

Parameters:
name - The name value.

getName

public java.lang.String getName()
Get the ident unit name.

Returns:
The name value.

setValue

public void setValue(java.lang.String value)
Set the ident unit value.

Parameters:
value - The value value.

getValue

public java.lang.String getValue()
Get the ident unit value.

Returns:
The ident value value.

isMatch

public abstract boolean isMatch(Request request)
Is this device identification unit a match for the device.

Parameters:
request - The device request.
Returns:
true If the device identification unit is a match, otherwise false.

equals

public boolean equals(java.lang.Object obj)
Is the supplied object equal to this ident unit.

If the object is a String it will be compared to the id value of the ident unit, otherwise it is a direct reference comparison.

Parameters:
obj - The object on which the comparison is to be made.

Milyn-Tinak Version 0.6.1