org.mule.module.ibeans
Interface HostIpIBean


@Usage(value="Simply pass in the ip address that you want to resolve and an XML document is returned with the geo locations. The format can be found here: http://api.hostip.info/?ip=12.215.42.19")
@ExpressionErrorFilter(eval="regex",
                       expr="Co-ordinates are unavailable",
                       mimeType="text/xml")
public interface HostIpIBean


Field Summary
static Class DEFAULT_RETURN_TYPE
           
static String GML_NS
           
 
Method Summary
 String dummyTemplateMethod(String number)
           
<T> T
getHostInfo(String ip)
           
 String getHostInfoName(String ip)
           
 Boolean hasIp(String ip)
           
 void init(Class returnType)
           
 

Field Detail

GML_NS

@Namespace(value="gml")
static final String GML_NS
See Also:
Constant Field Values

DEFAULT_RETURN_TYPE

@ReturnType
static final Class DEFAULT_RETURN_TYPE
Method Detail

getHostInfoName

@Call(uri="http://api.hostip.info?ip={ip}",
      properties="http.method=GET")
@Return(value="#[xpath2://gml:coordinates]")
String getHostInfoName(@UriParam(value="ip")
                                   String ip)
                       throws org.ibeans.api.CallException
Throws:
org.ibeans.api.CallException

hasIp

@Call(uri="http://api.hostip.info?ip={ip}",
      properties="http.method=GET")
@Return(value="#[xpath2:[boolean]count(//ip) = 1]")
Boolean hasIp(@UriParam(value="ip")
                          String ip)
              throws org.ibeans.api.CallException
Throws:
org.ibeans.api.CallException

init

@State
void init(@ReturnType
                Class returnType)

getHostInfo

@Call(uri="http://api.hostip.info?ip={ip}")
<T> T getHostInfo(@UriParam(value="ip")
                       String ip)
              throws org.ibeans.api.CallException
Throws:
org.ibeans.api.CallException

dummyTemplateMethod

@Template(value="one two {number}")
String dummyTemplateMethod(@UriParam(value="number")
                                    String number)


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.