LightJason - AgentSpeak(L++)
org.lightjason.agentspeak.action.builtin.web.IBaseWeb Class Referenceabstract

web base action class More...

+ Inheritance diagram for org.lightjason.agentspeak.action.builtin.web.IBaseWeb:
+ Collaboration diagram for org.lightjason.agentspeak.action.builtin.web.IBaseWeb:

Protected Member Functions

 IBaseWeb (final int p_length)
 ctor More...
 
- Protected Member Functions inherited from org.lightjason.agentspeak.action.builtin.IBuiltinAction
 IBuiltinAction ()
 ctor More...
 
 IBuiltinAction (final int p_length)
 ctor More...
 

Static Protected Member Functions

static ITerm baseliteral ( @Nonnull final Stream< String > p_functor, @Nonnull final Stream< ITerm > p_values)
 creates a literal structure from a stream of string elements, the string stream will be build in a tree structure More...
 
static Stream< ITermflatterm ( @Nullable final Object p_object)
 converts an object into a term stream More...
 
static HttpGet httpget ( @Nonnull final String p_url)
 returns a http-get connection More...
 
static String httpgetexecute ( @Nonnull final String p_url) throws IOException
 execute http-get request More...
 
static String httpgetexecute ( @Nonnull final HttpGet p_get) throws IOException
 execute http-get request More...
 
static HttpPost httppost ( @Nonnull final String p_url)
 returns a http-post connection More...
 
static String httppostexecute ( @Nonnull final HttpPost p_post) throws IOException
 execute http-post request More...
 

Static Private Member Functions

static Stream< ITermflatcollection ( @Nonnull final Collection<?> p_collection)
 transforms a collection into a term stream More...
 
static Stream< ITermflatmap ( @Nonnull final Map< String, ?> p_map)
 transformas a map into a literal More...
 
static< T extends HttpRequestBase > T header ( @Nonnull final T p_request)
 sets the default header definition More...
 

Static Private Attributes

static final long serialVersionUID = 4839156213009145751L
 serial id More...
 

Additional Inherited Members

- Public Member Functions inherited from org.lightjason.agentspeak.action.builtin.IBuiltinAction
final IPath name ()
 returns the name with path of the action More...
 
- Public Member Functions inherited from org.lightjason.agentspeak.action.IBaseAction
final boolean equals (final Object p_object)
 
final int hashCode ()
 
final String toString ()
 
- Public Member Functions inherited from org.lightjason.agentspeak.action.IAction
default int minimalArgumentNumber ()
 minimum number of arguments More...
 
default Stream< IVariable<?> > variables ()
 returns a stream with all used variables More...
 
- Public Member Functions inherited from org.lightjason.agentspeak.language.execution.IExecution
IFuzzyValue< Boolean > execute (final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
 defines a plan-body operation More...
 
- Public Attributes inherited from org.lightjason.agentspeak.action.IAction
long serialVersionUID = -6374480398439703170L
 serial id More...
 
- Static Protected Attributes inherited from org.lightjason.agentspeak.action.builtin.IBuiltinAction
static final Logger LOGGER = CCommon.logger( IBuiltinAction.class )
 logger More...
 
- Static Protected Attributes inherited from org.lightjason.agentspeak.action.IBaseAction
static final Logger LOGGER = org.lightjason.agentspeak.common.CCommon.logger( IAction.class )
 logger More...
 

Detailed Description

Definition at line 53 of file IBaseWeb.java.

Constructor & Destructor Documentation

◆ IBaseWeb()

org.lightjason.agentspeak.action.builtin.web.IBaseWeb.IBaseWeb ( final int  p_length)
protected
Parameters
p_lengthlength

Definition at line 65 of file IBaseWeb.java.

Member Function Documentation

◆ baseliteral()

static ITerm org.lightjason.agentspeak.action.builtin.web.IBaseWeb.baseliteral ( @Nonnull final Stream< String >  p_functor,
@Nonnull final Stream< ITerm p_values 
)
staticprotected
Parameters
p_functorstream with functor strings
p_valuesvalue stream
Returns
term

Definition at line 159 of file IBaseWeb.java.

References org.lightjason.agentspeak.language.CLiteral.from().

Referenced by org.lightjason.agentspeak.action.builtin.web.rest.CXMLObject.execute(), org.lightjason.agentspeak.action.builtin.web.rest.CJsonObject.execute(), org.lightjason.agentspeak.action.builtin.web.rest.CJsonList.execute(), and org.lightjason.agentspeak.action.builtin.web.graphql.IBaseGraphQL.execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flatcollection()

static Stream<ITerm> org.lightjason.agentspeak.action.builtin.web.IBaseWeb.flatcollection ( @Nonnull final Collection<?>  p_collection)
staticprivate
Parameters
p_collectioncollection
Returns
term stream

Definition at line 218 of file IBaseWeb.java.

References org.lightjason.agentspeak.action.builtin.web.IBaseWeb.flatterm().

Referenced by org.lightjason.agentspeak.action.builtin.web.IBaseWeb.flatterm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flatmap()

static Stream<ITerm> org.lightjason.agentspeak.action.builtin.web.IBaseWeb.flatmap ( @Nonnull final Map< String, ?>  p_map)
staticprivate
Parameters
p_mapinput map
Returns
term stream

Definition at line 199 of file IBaseWeb.java.

References org.lightjason.agentspeak.action.builtin.web.IBaseWeb.flatterm(), and org.lightjason.agentspeak.language.CLiteral.from().

Referenced by org.lightjason.agentspeak.action.builtin.web.IBaseWeb.flatterm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flatterm()

static Stream<ITerm> org.lightjason.agentspeak.action.builtin.web.IBaseWeb.flatterm ( @Nullable final Object  p_object)
staticprotected

◆ header()

static <T extends HttpRequestBase> T org.lightjason.agentspeak.action.builtin.web.IBaseWeb.header ( @Nonnull final T  p_request)
staticprivate
Parameters
p_requestrequest
Template Parameters
Trequest type
Returns
input request

Definition at line 99 of file IBaseWeb.java.

References org.lightjason.agentspeak.common.CCommon.configuration(), and org.lightjason.agentspeak.common.CCommon.PACKAGEROOT.

Referenced by org.lightjason.agentspeak.action.builtin.web.IBaseWeb.httpget(), and org.lightjason.agentspeak.action.builtin.web.IBaseWeb.httppost().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ httpget()

static HttpGet org.lightjason.agentspeak.action.builtin.web.IBaseWeb.httpget ( @Nonnull final String  p_url)
staticprotected
Parameters
p_urlurl
Returns
request

Definition at line 87 of file IBaseWeb.java.

References org.lightjason.agentspeak.action.builtin.web.IBaseWeb.header().

Referenced by org.lightjason.agentspeak.action.builtin.web.IBaseWeb.httpgetexecute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ httpgetexecute() [1/2]

static String org.lightjason.agentspeak.action.builtin.web.IBaseWeb.httpgetexecute ( @Nonnull final String  p_url) throws IOException
staticprotected
Parameters
p_urlurl
Returns
url data
Exceptions
IOExceptionis thrown on connection errors

Definition at line 121 of file IBaseWeb.java.

References org.lightjason.agentspeak.action.builtin.web.IBaseWeb.httpget().

Referenced by org.lightjason.agentspeak.action.builtin.web.rest.IBaseRest.json(), and org.lightjason.agentspeak.action.builtin.web.rest.IBaseRest.xml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ httpgetexecute() [2/2]

static String org.lightjason.agentspeak.action.builtin.web.IBaseWeb.httpgetexecute ( @Nonnull final HttpGet  p_get) throws IOException
staticprotected
Parameters
p_getget request
Returns
output data as string
Exceptions
IOExceptionis thrown on connection errors

Definition at line 133 of file IBaseWeb.java.

◆ httppost()

static HttpPost org.lightjason.agentspeak.action.builtin.web.IBaseWeb.httppost ( @Nonnull final String  p_url)
staticprotected
Parameters
p_urlurl
Returns
request

Definition at line 76 of file IBaseWeb.java.

References org.lightjason.agentspeak.action.builtin.web.IBaseWeb.header().

Referenced by org.lightjason.agentspeak.action.builtin.web.graphql.IBaseGraphQL.sendquery().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ httppostexecute()

static String org.lightjason.agentspeak.action.builtin.web.IBaseWeb.httppostexecute ( @Nonnull final HttpPost  p_post) throws IOException
staticprotected
Parameters
p_postpost request
Returns
output data as string
Exceptions
IOExceptionis thrown on connection errors

Definition at line 145 of file IBaseWeb.java.

Referenced by org.lightjason.agentspeak.action.builtin.web.graphql.IBaseGraphQL.sendquery().

+ Here is the caller graph for this function:

Member Data Documentation

◆ serialVersionUID

final long org.lightjason.agentspeak.action.builtin.web.IBaseWeb.serialVersionUID = 4839156213009145751L
staticprivate

Definition at line 58 of file IBaseWeb.java.