com.jakewharton.pingdom.entities
Class Check.CheckTypeWrapper

java.lang.Object
  extended by com.jakewharton.pingdom.entities.Check.CheckTypeWrapper
Enclosing class:
Check

public static final class Check.CheckTypeWrapper
extends Object

Wrapper for CheckType which allows for deserializing either the simple string type or a more complex object representation of the type with a single class.

Author:
Jake Wharton

Constructor Summary
Check.CheckTypeWrapper(CheckType typeNative, Check.CheckTypeBase typeObject)
           
 
Method Summary
 Check.DnsType asDns()
          Wrap type object as an Check.DnsType.
 Check.HttpType asHttp()
          Wrap type object as an Check.HttpType.
 Check.HttpCustomType asHttpCustom()
          Wrap type object as an Check.HttpCustomType.
 Check.ImapType asImap()
          Wrap type object as an Check.ImapType.
 Check.PingType asPing()
          Wrap type object as an Check.PingType.
 Check.Pop3Type asPop3()
          Wrap type object as an Check.Pop3Type.
 Check.SmtpType asSmtp()
          Wrap type object as an Check.SmtpType.
 Check.TcpType asTcp()
          Wrap type object as an Check.TcpType.
 Check.UdpType asUdp()
          Wrap type object as an Check.UdpType.
 CheckType getNative()
          Get native type enum value.
 Check.CheckTypeBase getTypeObject()
          Get type object representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Check.CheckTypeWrapper

public Check.CheckTypeWrapper(CheckType typeNative,
                              Check.CheckTypeBase typeObject)
Method Detail

getNative

public CheckType getNative()
Get native type enum value.

Returns:
Value.

getTypeObject

public Check.CheckTypeBase getTypeObject()

Get type object representation.

This is a general inflation target which contains all possible values for all types. You should call getNative() in your code and then the corresponding asXXX() method.

Returns:
Type object.

asHttp

public Check.HttpType asHttp()
Wrap type object as an Check.HttpType.

Returns:
Wrapped type.

asHttpCustom

public Check.HttpCustomType asHttpCustom()
Wrap type object as an Check.HttpCustomType.

Returns:
Wrapped type.

asTcp

public Check.TcpType asTcp()
Wrap type object as an Check.TcpType.

Returns:
Wrapped type.

asPing

public Check.PingType asPing()
Wrap type object as an Check.PingType.

Returns:
Wrapped type.

asDns

public Check.DnsType asDns()
Wrap type object as an Check.DnsType.

Returns:
Wrapped type.

asUdp

public Check.UdpType asUdp()
Wrap type object as an Check.UdpType.

Returns:
Wrapped type.

asSmtp

public Check.SmtpType asSmtp()
Wrap type object as an Check.SmtpType.

Returns:
Wrapped type.

asPop3

public Check.Pop3Type asPop3()
Wrap type object as an Check.Pop3Type.

Returns:
Wrapped type.

asImap

public Check.ImapType asImap()
Wrap type object as an Check.ImapType.

Returns:
Wrapped type.


Copyright © 2011 Jake Wharton. All Rights Reserved.