input
stringlengths
10
828
output
stringlengths
5
107
public void set enabled connection token dc boolean enabled throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server set enabled new object new boolean enabled oil2 response response socket handler synch request request response eval throws jmsexception
sets the enabled attribute of the oilserver il object
private void log string message log debug message
log a message on the logger associated with our manager if any
public void set bind address string host throws unknown host exception if host is null or empty use any address if host null host length 0 bind address null else bind address inet address get by name host
set the interface address the oil server bind its listening port on
public string get id throws exception connect oil2 request request new oil2 request oil2 constants server get id null oil2 response response socket handler synch request request return string response eval throws jmsexception
gets the id attribute of the oilserver il object
public void ping connection token dc long client time throws jmsexception try dc client il pong system current time millis catch exception e throw new spy jmsexception could not pong e
description of the method
public boolean get enable tcp no delay return enable tcp no delay
gets the enable tcp no delay
public temporary queue get temporary queue connection token dc throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server get temporary queue null oil2 response response socket handler synch request request return temporary queue response eval throws jmsexception
gets the temporary queue attribute of the oilserver il object
public temporary topic get temporary topic connection token dc throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server get temporary topic null oil2 response response socket handler synch request request return temporary topic response eval throws jmsexception
gets the temporary topic attribute of the oilserver il object
private void log string message throwable throwable log error message throwable
log a message on the logger associated with our manager if any
private watchdog corrective action get entry object name object name throws hermes exception watchdog corrective action watchdog corrective action null string key object name to string object object m watchdog corrective actions get key if object null watchdog corrective action new watchdog corrective action this log debug get entry object name created watchdog corrective action watchdog corrective action get current corrective action m watchdog corrective actions put key watchdog corrective action else watchdog corrective action watchdog corrective action object return watchdog corrective action
obtains the corrective action associated with an object instance
public void set enable tcp no delay boolean enable tcp no delay this enable tcp no delay enable tcp no delay
sets the enable tcp no delay
public message cache get message cache return get persistence manager get message cache instance
gets the message cache
public void acknowledge connection token dc acknowledgement request item throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server acknowledge new object item oil2 response response socket handler synch request request response eval throws jmsexception
description of the method
public string get client socket factory return client socket factory name
get the javax
public void add message connection token dc spy message val throws exception connect oil2 request request new oil2 request oil2 constants server add message new object val oil2 response response socket handler synch request request response eval throws jmsexception
adds a feature to the message attribute of the oilserver il object
public void set message cache message cache message cache this message cache message cache
sets the message cache
public void set client socket factory string name this client socket factory name name
set the javax
public void check id string id throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server check id new object id oil2 response response socket handler synch request request response eval throws jmsexception
description of the method
public string check user string user name string password throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server check user new object user name password oil2 response response socket handler synch request request return string response eval throws jmsexception
description of the method
public void set server socket factory string name throws exception class loader loader thread current thread get context class loader class ssf class loader load class name server socket factory server socket factory ssf class new instance
set the javax
public string get name return elba mq uilserver il
gives this jmx service a name
public string authenticate string user name string password throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server authenticate new object user name password oil2 response response socket handler synch request request return string response eval throws jmsexception
description of the method
public int compare to object o spy message sm spy message o if header jms priority sm header jms priority return 1 if header jms priority sm header jms priority return 1 return int header message id sm header message id
return a negative number if this message should be sent
public string get server socket factory string name null if server socket factory null name server socket factory get class get name return name
get the javax
public stream demux get demux return demux
creation date 11 16 00 1 15 01 pm
public stream mux get mux return mux
creation date 11 16 00 1 15 01 pm
private void update entry object name object name throws exception get entry object name set corrective action succeeded is running object name
updates the associated corrective action of code object instance code by obtaining the
public void set security domain string domain name this security domain domain name
set the security domain name to use with ssl aware socket factories
public void reset message counter iterator i destinations values iterator while i has next jmsdestination dest jmsdestination i next message counter counter dest get message counter for int j 0 j counter length j counter j reset counter
resets message counters of all configured destinations
public server il clone server il throws exception return server il clone
need to clone because there are instance variables tha can get clobbered
public short get frame size synchronized open streams return frame size
insert the methods description here
public void connection closing connection token dc throws jmsexception exception try connect oil2 request request new oil2 request oil2 constants server connection closing null oil2 response response socket handler synch request request response eval throws jmsexception finally close
description of the method
public void stop service try running false unbind jndireferences unbind the server socket if needed if server socket null server socket close catch exception e log error exception occured when trying to stop uil service e
stops this il and unbinds it from jndi also closes the server socket
public queue create queue connection token dc string dest throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server create queue new object dest oil2 response response socket handler synch request request return queue response eval throws jmsexception
description of the method
public topic create topic connection token dc string dest throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server create topic new object dest oil2 response response socket handler synch request request return topic response eval throws jmsexception
description of the method
public void start service throws exception super start service server il new rmiserver il lookup jmsserver bind jndireferences
starts this il and binds it to jndi
public void stop service try unbind jndireferences catch exception e e print stack trace
stops this il and unbinds it from jndi
public void set time out int timeout this timeout timeout 1000 provided in seconds so turn it into millis
set the httpil default timeout the number of seconds that the client ilservice
public int get time out return int this timeout 1000 stored in millis but return it in seconds
get the httpil default timeout
public void ping connection token dc long client time throws exception connect oil2 request request new oil2 request oil2 constants server ping new object new long client time oil2 response response socket handler synch request request response eval throws jmsexception
description of the method
public void set rest interval int rest interval this rest interval rest interval 1000 provided in seconds so turn it into millis
set the httpil default rest interval the number of seconds the client ilservice
private void throw interrupted exception if interrupted throws interrupted exception if thread current thread is interrupted log debug have throw interrupted exception if interrupted throw new interrupted exception
throws an interrupted exception if is interrupted is set on the current thread
public int get rest interval return int this rest interval 1000 stored in millis but return it in seconds
get the httpil default rest interval
public void set url string url this url url set all specific url properties to null values i know we could parse the url and set these but the url might be a property name besides letting them have value in this case might mislead people into thinking that the value mattered as the javadoc states when the url is set all these value are irrelivant this url prefix null this url host name null this url port 0 this url suffix null this use host name false
set the httpil url
public spy message receive connection token dc int subscriber id long wait throws exception exception connect oil2 request request new oil2 request oil2 constants server receive new object new integer subscriber id new long wait oil2 response response socket handler synch request request return spy message response eval throws jmsexception
description of the method
public void set urlprefix string prefix this url prefix prefix
set the httpil urlprefix
public string get urlprefix return this url prefix
get the httpil urlprefix
public void subscribe connection token dc org elba mq subscription s throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server subscribe new object s oil2 response response socket handler synch request request response eval throws jmsexception
description of the method
public void set urlhost name string hostname this url host name hostname
set the httpil urlname
public string get urlhost name return this url host name
get the httpil urlhost name
public void set urlport int port this url port port
set the httpil urlport
public int get urlport return this url port
get the httpil urlport
public void set urlsuffix string suffix this url suffix suffix
set the httpil urlsuffix
public string get urlsuffix return this url suffix
get the httpil urlsuffix
public void set use host name boolean value this use host name value
set the httpil use host name flag
public boolean get use host name return this use host name
get the httpil use host name flag
public void unsubscribe connection token dc int subscription id throws jmsexception exception connect oil2 request request new oil2 request oil2 constants server unsubscribe new object new integer subscription id oil2 response response socket handler synch request request response eval throws jmsexception
description of the method
synchronized public void close try if socket null socket handler stop in close out close socket close socket null catch ioexception e log debug exception occured while closing opened resources e
used to close the current connection with the server
public properties get client connection properties return connection properties
used to construct the generic connection factory bind jndireferences
public void stop synchronized running if read state started read state stopping read thread interrupt if write state started write state stopping write thread interrupt running new boolean false
stop the read and write threads by interrupting them
public void run while running socket socket null socket manager socket mgr null try socket server socket accept socket set so timeout read timeout socket set tcp no delay enable tcp no delay socket mgr new socket manager socket server socket manager handler handler new server socket manager handler server socket mgr socket mgr set handler handler socket mgr set buffer size buffer size socket mgr set chunk size chunk size socket mgr start server get thread group catch ioexception e if running log warn failed to setup client connection e
client socket accept thread
public void set handler socket manager handler handler this handler handler if buffered input null buffered input set stream listener handler if buffered output null buffered output set stream listener handler
set the callback handler for msgs that were not originated by the
public void stop service try running false unbind jndireferences unbind server socket if needed if server socket null server socket close catch exception e log error exception occured when trying to stop uil service e
stops this il and unbinds it from jndi
public void set chunk size int size this chunk size size
sets the chunk size
public void set msg id int msg id this msg id msg id
set the msg id
public void set error throwable e if e instanceof exception error exception e else error new undeclared throwable exception e
set an exception that should be used as the msg return value
public string get data directory return data directory
gets the data directory attribute of the cache store mbean object
public void set data directory string new data directory data directory new data directory
sets the data directory attribute of the cache store mbean object
public boolean equals object o base msg msg base msg o return msg msg id msg id
equality is based on base msg
public int hash code return msg id
hash code is simply the msg id
public void handle msg base msg msg try handler handle msg msg catch throwable e log error failed to handle msg to string e msg set error e try internal send message msg false catch exception ie log warn failed to send error reply e
handle the message or respond with an error
private void handle stop string error throwable e synchronized running read state stopping running new boolean false if e instanceof ioexception e instanceof interrupted exception if trace log trace error e else log error error e reply all e if handler null handler asynch failure error e handler close synchronized running read state stopped if write state started write state stopping write thread interrupt try in close catch exception ignored if trace log trace ignored get message ignored try socket close catch exception ignored if trace log trace ignored get message ignored
stop the read thread
public void trim reply
trim the message when replying
private boolean is watching synchronized m watching lock return m is watching
determines whether this watchdog is watching
public void write object output stream out throws ioexception out write byte msg type out write int msg id int has error error null 1 0 out write byte has error if has error 1 out write object error
write the msg type msg id has error flag and optionally the error
public void read object input stream in throws ioexception class not found exception int has error in read byte if has error 1 error exception in read object
read the has error flag and optionally the error
private void handle stop base msg msg string error throwable e synchronized running write state stopping running new boolean false if e instanceof interrupted exception e instanceof ioexception if trace log trace error e else log error error e if msg null msg set error e synchronized msg msg notify synchronized running write state stopped if read state started read state stopping read thread interrupt try out close catch exception ignored if trace log trace ignored get message ignored try socket close catch exception ignored if trace log trace ignored get message ignored
stop the write thread
private void set is watching final boolean is watching synchronized m watching lock m is watching is watching
sets whether this watchdog is watching
public void shutdown stopping true synchronized queue remove all queued work queue clear notify all waiting threads queue notify all wait for all worker threads to die synchronized workers while workers size 0 try wait for some worker threads to die workers wait catch interrupted exception ex ignore
shutdown this thread pool
public void cancel work work work synchronized queue it may be enqueued several times while queue remove work
cancel a piece of enqueued work
private void idle try synchronized workers idle workers system err println thread pool name get name starting to wait queue wait catch interrupted exception ex ignore finally system err println thread pool name get name done waiting synchronized workers idle workers
wait for work do to
public void set roll over size int roll over size this roll over size roll over size
sets the maximum number of messages before log rolls over
public object get instance return this
returns this instance
public void restore destination jmsdestination jms dest throws jmsexception if jms dest instanceof jmsqueue spy destination spy dest jms dest get spy destination restore queue jms dest spy dest else if jms dest instanceof jmstopic collection persist qlist jmstopic jms dest get persistent queues iterator pq persist qlist iterator while pq has next spy destination spy dest persistent queue pq next get spy destination restore queue jms dest spy dest
the code restore destination code method is called by a queue or
private thread get watching thread return m watching thread
gets the thread that is doing the watching
public void set connection connection con this con con
client side temporary queues need a reference to the connection
private void set watching thread thread watching thread m watching thread watching thread
sets the thread that is doing the watching
public void print stack trace final print stream stream if nested null nested throwable parent trace enabled super print stack trace stream nested throwable util print nested stream
prints the composite message and the embedded stack trace to the
public void print stack trace final print writer writer if nested null nested throwable parent trace enabled super print stack trace writer nested throwable util print nested writer
prints the composite message and the embedded stack trace to the
public void commit persistent tx org elba mq pm tx tx id throws jmsexception tx info info synchronized transacted tasks info tx info transacted tasks remove tx id ensure record of tx exists try info raf close catch ioexception e jmsexception jmse new spy jmsexception io error when closing raf for tx jmse set linked exception e throw jmse synchronized info tasks iterator iter info tasks iterator while iter has next transaction task transaction iter next task commit delete tx file info txf release tx info info
description of the method
public boolean login throws login exception if sm null throw new login exception state manager is null return super login
check we have contact to a state manager
protected boolean validate password string input password string expected password boolean valid false try valid sm validate password get username input password catch exception ex super log debug could not validate password for user get username ex return valid
validate the password againts the state manager
private void initialise corrective actions m watchdog corrective actions new hash map
initialise the corrective actions
public void set state file string new state file state file new state file trim
sets the state file attribute of the state manager mbean object
protected void destroy connection try if socket null try socket mgr stop finally socket close catch ioexception ignore
used to close the current connection with the server
public void update message reference message ref org elba mq pm tx tx id throws jmsexception spy message message message ref get message log info log info synchronized message logs log info log info message logs get message get jmsdestination to string if log info null throw new jmsexception destination was not initalized with the persistence manager log info log update message ref tx id if tx id null log info log finish update message ref tx id else throw new jmsexception nyi no code does transactional updates
description of the method
public spy topic get durable topic durable subscription id sub throws jmsexception try xelement subscription get subscription sub if subscription null throw new jmsexception no durable subscription found for subscription sub get subscription name return new spy topic subscription get field topic name catch xelement exception e jmsexception new e new spy jmsexception could not find durable subscription new e set linked exception e throw new e
get the destination a subscription is for
public void rollback persistent tx org elba mq pm tx tx id throws jmsexception tx info info synchronized transacted tasks info tx info transacted tasks remove tx id ensure record of tx exists try info raf close catch ioexception e jmsexception jmse new spy jmsexception io error when closing raf for tx jmse set linked exception e throw jmse synchronized info tasks iterator iter info tasks iterator while iter has next transaction task transaction iter next task rollback delete tx file info txf release tx info info
description of the method
public string display state config throws exception return state config to string
show the current configuration
public string get state file return state file
gets the state file attribute of the state manager mbean object