input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void describe to description desc desc append text reference document to xml
|
describes the reference document
|
public xcf event call method string name xcf event param throws method not found exception user exception return state call method name param
|
tries to execute the method identified by the method parameter on the
|
public void call method string name xcf event param async method callback cb throws method not found exception user exception state call method name param cb
|
tries to asynchronously execute the method identified by the method
|
public xcf uri get server uri return server uri
|
returns the unique name of the connected server instance
|
public xcf event get instance xopdata xop metadata meta return new xcf event xop meta
|
this factory method is used to create a new xcf event instance using
|
public xcf event copy fixme metadata needs to be copied else is connected to the original document xcf event copy new xcf event document this get document copy meta iterator string it message get uri iterator while it has next string uri it next copy message add attachment uri message get attachment uri copy source source return copy
|
shallow copies the xcf event except for its binary attachments
|
public boolean cancel boolean may interrupt if running cancelled true if may interrupt if running notify all return true
|
this method makes the waiting thread return with a cancellation exception
|
public string get service return only the service name which is the first path element return get path element at 0
|
returns the name of the service specified in this uri if any
|
public string get interface return only the interface name which is the second path element return get path element at 1
|
returns the name of the interface specified in this uri if any
|
public void checked wait for publisher string name long timeout publishers checked wait for name timeout
|
wait for the named server throwing an exception if it does
|
public void checked wait for server string name long timeout servers checked wait for name timeout
|
wait for the named server throwing an exception if it does
|
public boolean wait for publisher string name long timeout return publishers wait for name timeout
|
wait until a publisher with the name appears or a timeout passes
|
public boolean wait for server string name long timeout return servers wait for name timeout
|
wait until a server with the name appears or a timeout passes
|
public long get elapsed time if start 1 return 0 if running return get current time start else return stop start
|
returns time in milliseconds if timer was
|
public void remove listener request listener c todo we need to remove the listener here but do not have it s subscription either save subscriptions for listeners or add a remove method to dtmtree that removes all subscriptions for a given listener
|
removes an already registered code xcf event listener code
|
public void skip event id id skip id get id
|
skip this filter for any event with the specified id
|
public boolean must skip event id id return must skip id get id
|
returns whether events with the specified id should be skipped or not
|
public void skipped event id id whitelist remove id get id
|
remove id from the list after the corresponding event has been skipped
|
public void remove xopdata d throws memory exception element root d get document get root element attribute attr root get attribute id http www sleepycat com 2002 dbxml if attr null throw new memory exception the attribute dbxml id is not in root element root to xml else string id root get attribute id http www sleepycat com 2002 dbxml get value remove new xpath dbxml id id
|
removes a specific document from an active memory instance
|
public void add listener xcf event listener l subscription sub new subscription log debug subscribing new listener to scope uri get scope and identity publisher uri sub append new scope filter uri sub append new identity filter publisher uri identity filter type sender identity router subscribe sub l
|
register an event listener on this subscriber to be notified about
|
public boolean remove listener publish event listener l todo put subscription into the listener or in a map router unsubscribe sub sink return false
|
remove an event listener from this subscriber
|
public document merge document context merge context get root element return context
|
convenience method to merge element
|
public node replace element context element tmpl root template get root element try to find elements with same name in context elements replace context get child elements tmpl root get local name tmpl root get namespace uri for int i 0 i replace size i replace get i detach insert copy of template element new root element tmpl root copy context append child new root return new root
|
imposes this template onto the given dom root node
|
public document replace document context merge context get root element return context
|
convenience method to replace element
|
public class get content type return c
|
returns the type of the serialized object
|
public string get as string throws serialize exception byte array input stream bais new byte array input stream get value try object input stream oos new object input stream bais return string oos read object catch ioexception e e print stack trace throw new serialize exception caught ioexception deserializing attachement to string catch class not found exception e e print stack trace throw new serialize exception caught class not found exception deserializing attachement to string
|
deserializes the contents of this attachment into a string
|
public void set document string d throws syntax exception try doc document builder create document d catch validity exception e log warn caught validity exception trying to set xopdata s document from string throw new syntax exception could not create xopdata from xml string parsing failed e get message catch parsing exception e throw new syntax exception could not create xopdata from xml string parsing failed e get message
|
sets this code xopdata code s code xml code document to the
|
public void publish xcf event e eq push e
|
published an xcf event over the event bus
|
public void unsubscribe subscription sub xcf event listener sink epi remove sub sink
|
subscribes a listener to all events that pass its filter chain
|
public void set document document d doc d
|
sets this code xopdata code s code xom document code
|
public void set document org w3c dom document d throws syntax exception try doc domconverter convert d catch xmlexception e throw new syntax exception could not create xopdata from malformed dom document e get message
|
sets this code xopdata code s code xom document code from the
|
public void add attachment string uri attachment a attachments put uri a
|
adds an code attachment code identified by uri to this
|
public attachment get attachment string uri if attachments contains key uri return attachments get uri else throw new attachment not found exception no attachment found for uri uri
|
returns the code attachment code identified by uri
|
public boolean is empty return doc null xml null attachments size 0
|
checks whether this code xopdata code instance contains an xml string
|
public void assign xopdata xop2 this doc xop2 doc this xml xop2 xml this attachments xop2 attachments
|
assigns the contents of the passed code xopdata code to this instance
|
public boolean has attachment string uri if attachments contains key uri return true return false
|
checks whether this code xopdata code has an code attachment code
|
public server create server string uri object o throws name exists exception initialize exception return state create server uri o
|
creates a new server with given name and given methods from the object
|
public server create server string uri throws name exists exception initialize exception return state create server uri null
|
creates a new server instance with a given name
|
public remote server create remote server string uri throws not found exception initialize exception return state create remote server uri
|
creates a client object that provides access to an
|
public publisher create publisher string name throws name exists exception initialize exception return state create publisher name
|
create a publisher instance that allows for 1 n publish subscribe
|
public subscriber create subscriber string uri throws not found exception initialize exception return state create subscriber uri
|
creates a subcriber instance that receives message from a publisher
|
public active memory create active memory string uri throws initialize exception not found exception return state create active memory uri
|
create an interface class that provides access and management methods for an
|
public plane type get image layout return ptype
|
returns layout of the image
|
override protected void startup view new xcf chat view this view set xcf chat status disconnected view set dispatcher status chatclient get dispatcher show view
|
at startup create and show the main frame of the application
|
public string get message nodes n doc query chat msg node content n get 0 return content get value
|
gets the textual chat message from the
|
public string get nick return doc get root element get attribute value nick
|
gets the nick name from the
|
private void publish message xopdata data if running p send data
|
publish a chat message to the members of the
|
public void add t item elements add item fire element added elements size 1
|
add an element at the end
|
public void add all final list t items final int prev size elements size elements add all items fire interval added prev size 1 elements size 1
|
add all elements in the list
|
override protected void startup try xcf manager xm xcf manager create xcf manager view new jmi view xm this show view if memory name null logger info connection to memory name view do connect memory name catch exception ex system err println could not contact dispatcher ex get message system exit 1
|
at startup create and show the main frame of the application
|
public boolean offer t evt return event queue offer evt
|
offers a new event for insertion into the queue
|
protected document read contents file file throws ioexception parsing exception message reading message file builder builder new builder return builder build file
|
return file contents using default encoding
|
public boolean maybe active memory return false
|
returns a guess as to whether the server refers to an active memory
|
public xopdata get reference element return element
|
retrieve the reference element
|
public void set reference element xopdata element this element element clear iterator string uri iter element get uri iterator while uri iter has next add uri iter next
|
set the attachment list to that of the given reference element
|
public void activate for plugin factory pf service loader load plugin factory class try final memory event listener l pf create plugin listener if am add listener l plugins add l final component c pf create plugin component l parent add c plugin gui add c c set visible true catch memory exception ex logger get logger plugin manager class get name log level severe null ex
|
load all plugins attach them as listeners to the memory and add
|
public void deactivate iterator memory event listener plugin iter plugins iterator iterator component gui iter plugin gui iterator while plugin iter has next try if am remove listener plugin iter next parent remove gui iter next plugin iter remove gui iter remove catch memory exception ex logger get logger plugin manager class get name log level severe null ex
|
remove all previously added plugins and their gui
|
public void init hash map string node message definitions hash map string publisher publishers hash map string active memory memories central logger debug this initialize console handler if message definitions null this message definitions message definitions if publishers null this publishers publishers if memories null this memories memories
|
initialize the message definitions
|
public active memory get memory string mem name throws xcf object not existing exception active memory am memories get mem name if am null central logger debug this invalid memory name mem name return am
|
returns the active memory with name mem name
|
public publisher get publisher string pub name throws xcf object not existing exception publisher pub publishers get pub name if pub null throw new xcf object not existing exception invalid publisher name pub name return pub
|
returns the publisher with name pub name
|
public void set resolved bindings map hash map string t map this resolved bindings hash map string t map
|
set a reference on where to store the resolved bindings
|
public void check keyboard input condition current cond throws ioexception buffered reader stdin new buffered reader new input stream reader system in 1 if system in available 0 string input stdin read line if input length 1 input starts with console input key printer print keyboard enter input info this input stdin read line if input length 0 boolean cmd from keybord successfull create and execute command from keyboard command creator input stdin if cmd from keybord successfull current cond notify about enter else current cond notify about enter
|
p checks system
|
public boolean create and execute command from keyboard command creator cc string input buffered reader stdin try node input message create msg from input input trim stdin if input message null command command from keyboard cc create command input message central logger info this created command from keyboard command from keyboard to string command from keyboard execute return true catch exception e central logger error this exception while executing command from keyboard ignore e print stack trace return false
|
tries to create a node representing a command from input
|
private void start if state equals state not sending periodic send timer start switch state
|
if not sending starts periodic send timer and switches state
|
private void stop if state equals state sending periodic send timer stop switch state
|
if sending stops periodic send timer and switches state
|
private string resolve variable string str throws invalid cfg doc exception if str null return str string new str if str starts with str ends with new str str substring 1 str length 1 remove closing else new str get variable str return new str
|
if there are closing around str removes them and returns str
|
public int get command periodic time int i int time 1 try time integer parse int string xml parser extract values command creator node periodic commands get i 1 false to array 0 catch exception e return 1 return time
|
the methode return null if the command not contains an periodic command
|
public time condition int delay time super this delay time delay time this delay timer new timer delay time this central logger debug this send message after this delay time m sec delay delay timer start
|
the constructor initialize the timer and start them
|
protected void set manipulation enabled boolean enabled query button set enabled enabled xpath field set enabled enabled add from file item set enabled enabled remove button set enabled enabled enumeration e memory action group get elements while e has more elements jradio button e next element set enabled enabled
|
set the manipulation gui elements to the given state
|
public void set max in process notification threads int max pool size notification delivery service set maximum pool size max pool size
|
set maximum number of threads to use for in process event notification
|
public void wait on event delivery throws interrupted exception while notification delivery service get queue size 0 thread sleep 10
|
wait until all currently pending event delivers have finished
|
override protected void startup show new simulator main frame this simulator todo bad exception printing
|
at startup create and show the main frame of the application
|
public void existence check nodes nodes string node name for debugging throws invalid cfg doc exception if nodes size 0 throw new invalid cfg doc exception message doesn t contain a node name for debugging node
|
does nothing if nodes contains at least one node
|
public string get vdemo command string command element element this get vdemo config element command element element get first child element command if command element null command command element get value else log info no command found in the vdemo component this to string return command
|
returns the command for the vdemo component
|
public void stop component sshcomponent component log info sshcontainer stopping component component get config get config path array list xcf event results new array list xcf event if verify component state component results component state running component state terminated call vdemo scripts to start the component s process
|
stop the specified component
|
public void check component state sshcomponent component component event e null if component get state component state running if is component alive component component still running e new component state event component state running else component set state component state terminated e new component state changed event component state terminated component state running else e new component state event component get state e set uri new xcf uri component get config get local uri e set host component get container get deployment environment get host name raise event e
|
check the components state
|
public void inspect component sshcomponent component
|
inspects the component
|
public void activate throws initialize exception super activate todo open ssh connection if this is a remote container raise event new authenticate event this get deployment environment to string raise event new container available event this
|
acivates this ssh container
|
public shell process create process string name remote shell process remote process new remote shell process name remote process set append logfile timestamp false remote process set append logfiles false return remote process
|
creates a new process which may be given a local or remote scope
|
public boolean execute for action extends container t this if t execute return false return true
|
executes a sequence of actions
|
public container get container scale component plugin component plugin string container type container c null if container type equals shell c shell container get instance component plugin else if container type equals vdemo c vdemo container get instance component plugin else if container type equals jvm c jvmcontainer get instance component plugin else if container type equals icewing c icewing container get instance component plugin else if container type equals ssh c sshcontainer get instance component plugin else throw new system model exception unknown container type container type containers add c return c
|
delivers a specified container
|
public void detach component vdemo component component log info vdemo container detaching component component get config get config path vector xcf event results new vector xcf event 1 call vdemo scripts to start the component s process shell process p component get container vdemo command component detach try execute vdemo command component p detach catch exception e log debug e get class get name trying to execute vdemo detach for component component get config get config path e get message p stop for xcf event e results raise event e
|
detaches a given component from the event messaging
|
public void execute bash script string script int execution timeout throws not implemented exception log error not implemented vdemo container executing bash script script throw new not implemented exception
|
not implemented yet
|
private boolean execute vdemo command vdemo component component shell process p string vdemocmd throws container exception log info vdemo container executing vdemocmd component get config get config path try log info shell process with following settings started p to string return p start sync catch exception e throw new container exception e get class get name trying to execute vdemo command vdemocmd component get config get local uri e get message
|
executes a vdemo command
|
protected void extract parameters container node single node add xcf parameters to property list fill properties single node get parameters scale system model plugin spl scale system model plugin single node get plugin scale add scale parameters to property list fill properties spl get parameters
|
adds xcf parameters to the list of properties
|
private void fill properties value list hash map for string key hash map key set this properties put hash map get prefix key hash map get key
|
fills up the properties via a value list
|
private boolean verify component state vdemo component component vector xcf event results component state expected vector component state expected states new vector component state expected length for component state s expected expected states add s if expected states contains component get state container error etmp new container error etmp set message component component get config get local uri is in component get state name to upper case state should be one of expected states to string results add etmp return false else return true
|
checks if one of the given expected states are available
|
public int get column count return max column amount
|
maximum value for columns set to 4
|
public int get row count return this values size
|
returns the amount of rows
|
public void handle event task event task log debug scale received a task event
|
handles task events sent to the coordination by the ui
|
public void set hash map string string properties values clear refresh the values for string key properties key set add a property by name and value to existing table of properties add property key properties get key property type string false this fire table structure changed
|
sets up new properties by a given collection of values
|
public void add property string name string value property type type boolean fire event values add new property name value type if fire event this fire table structure changed
|
adds one row to the properties list
|
public void auto size columns boolean is multilined boolean is trimmed this calculate column width no multilines cells this calc cell height is multilined is trimmed
|
resizes the property table automatically
|
public void extract values system model node context element container string element name nodes ns props container query get prefix element name get xpath context for int j 0 j ns props size j element elm prop element ns props get j string q name elm prop get attribute value name if contains key q name throw new system model exception context name clash for element name get prefix q name put q name elm prop get value
|
fills this value list by extracting name value pairs from the xml
|
public void substitute variables value list from for string key key set string value get key if value index of 1 this value contains at least one variable for string key sub from key set try to replace by every existing name using prefix string prefixed key from get prefix key sub replace prefix name occurrences value value replace all pattern quote prefixed key matcher quote replacement from get key sub replace prefix name occurrences value value replace all pattern quote prefixed key matcher quote replacement from get key sub put key value
|
replaces any variables found in the values of this value list with values
|
private void exec command sshclient client string command throws ioexception sshclient ssh client session session ssh start session command cmd session exec command system out println cmd pipe pipe cmd get input stream system out cmd get local max packet size false system out print cmd get output as string system out println n exit status cmd get exit status
|
executes a remote command
|
protected void constructed for system model plugin p plugins values p ascending this this config
|
this method is called after the recursive algorithm constructing the system model
|
public void handle event container event e log debug scale received a container event system out println scale received a container event
|
handles events generated by containers such as unexpected termination of
|
public void set selected node tree system model node tree node selected node tree node receives the properties from selected node property model properties table get model set tree node get properties properties table auto size columns this is multiline active this is trimming active properties table get row sorter toggle sort order 0 frame repaint
|
sets up the selected node properties on the gui
|
public void connect service source search through the servicethe s interfaces and try matching them for string name source interfaces key set if interfaces contains key name there is a reference by that name connect the reference to that interface interfaces get name connect source interfaces get name else throw new system model exception this name mismatch trying to wire interface name of remote service source get name
|
connects this service to another service
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.