import { XML } from "sxml"; import { EntityArray } from "../entity/EntityArray"; import { InvokeParameter } from "./InvokeParameter"; /** * Standard message of network I/O. * * {@link Invoke} is a class used in network I/O in protocol package of Samchon Framework. * * The Invoke message has an XML structure like the result screen of provided example in below. * We can enjoy lots of benefits by the normalized and standardized message structure used in * network I/O. * * The greatest advantage is that we can make any type of network system, even how the system * is enourmously complicated. As network communication message is standardized, we only need to * concentrate on logical relationships between network systems. We can handle each network system * like a object (class) in OOD. And those relationships can be easily designed by using design * pattern. * * In Samchon Framework, you can make any type of network system with basic componenets * (IProtocol, IServer and ICommunicator) by implemens or inherits them, like designing * classes of S/W architecture. * * ![Class Diagram](http://samchon.github.io/framework/images/design/ts_class_diagram/protocol_message_protocol.png) * * @see {@link IProtocol} * @author Jeongho Nam */ export declare class Invoke extends EntityArray { /** * Listener, represent function's name. */ private listener; /** * Default Constructor. */ constructor(); constructor(listener: string); /** * Copy Constructor. * * @param invoke */ constructor(invoke: Invoke); /** * Construct from listener and parametric values. * * @param listener * @param parameters */ constructor(listener: string, ...parameters: Array); /** * @inheritdoc */ createChild(xml: XML): InvokeParameter; /** * Get listener. */ getListener(): string; /** * Get arguments for Function.apply(). * * @return An array containing values of the contained parameters. */ getArguments(): Array; /** * Apply to a matched function. * * @param obj Target object to find matched function. * @return Whether succeded to find matched function. */ apply(obj: Object): boolean; /** * Apply to a function. * * @param thisArg Owner of the function. * @param func Function to call. */ apply(thisArg: Object, func: Function): void; /** * @inheritdoc */ TAG(): string; /** * @inheritdoc */ CHILD_TAG(): string; }