input
stringlengths
10
828
output
stringlengths
5
107
public state manager get state manager return state manager
gets the state manager attribute of the jmsserver object
public long get max memory mark return max memory mark one megabyte
gets the max memory mark
protected void drop message message reference message try if message is persistent try server get persistence manager remove message null catch jmsexception e try log warn message removed from queue but not from the persistent store message get message e catch jmsexception x log warn message removed from queue but not from the persistent store message e server get message cache remove message catch jmsexception e log warn error dropping message message e
remove a message
public void start server synchronized state lock this stopped false
description of the method
public long get current memory usage return runtime get runtime total memory runtime get runtime free memory one megabyte
gets the current memory usage
public void reset history int max day counter max set history limit 0 set history limit max
reset message counter history
private void check removed subscribers subscription sub boolean trace log is trace enabled if removed subscribers contains sub has unacked messages sub false if trace log trace removing subscriber sub removed subscribers remove sub client consumer sub client consumer remove removed subscription sub subscription id
check whether a removed subscription can be permenantly removed
public void set max memory mark long max memory mark this max memory mark max memory mark one megabyte
sets the max memory mark
public void stop server synchronized state lock this stopped true any cleanup work that needs doing should be done here at the moment there is nothing to do due to the fact that the individual parts of the elbamq pm ils etc each have their own mbean service which starts and stops them separately we could wait in here for the client consumers to finish delivering any messages they have but it is not neccessary as the client acks will be lost anyway this alive false
description of the method
private void restart agent try log debug restart agent m object name m unresolved rmi agent binding final string message m object name restarting agent m unresolved rmi agent binding dispatch event new watchdog event message m cascading agent stop stop mirroring stop agent start agent m cascading agent start start mirroring update entries m server query mbeans m watched domain object name null catch exception e log warning restart agent m object name m unresolved rmi agent binding exception thrown log warning e finally log debug restart agent done
restart the jmx agent that is being watched
public string get history as string string ret ensure history counters are up to date update history false compile string synchronized day counter first line history day count ret day counter size n following lines day counter data for int i 0 i day counter size i day counter counter day counter day counter get i ret counter get day counter as string n return ret
get message counter history data as string in format
public void remove note string name synchronized notes notes remove name
remove any object bound to the specified name in the internal notes
public void check id string id throws jmsexception if id null id starts with id throw new invalid client idexception client id is not a valid id id state manager add logged on client id id
check a clien id set by the client
private boolean has unacked messages subscription sub return unacked by subscription contains key sub
check whether a subscription has unacknowledged messages
public void remove session listener session listener listener synchronized listeners listeners remove listener
remove a session event listener from this component
public void add message connection token dc spy message val throws jmsexception add message dc val null
adds a feature to the message attribute of the jmsserver object
public void do work try receive request job synchronized messages if closed return job new receive request messages size iterator iter messages iterator for int i 0 iter has next i routed message rm routed message iter next job i rm to receive request iter remove enqueued false connection token client il receive job catch exception e log warn could not send messages to a receiver e try server connection failure connection token catch throwable ignore log warn could not close the client connection ignore
push some messages
public object name get cache store return cache store name
the code get cache store code method
public thread group get thread group if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt return get next get thread group
get the thread group of the server
public string get id throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt return get next get id
gets a client id from server
public void add message connection token dc spy message val tx tx id throws jmsexception jmsdestination queue jmsdestination destinations get val get jmsdestination if queue null throw new invalid destination exception this destination does not exist val get jmsdestination add the message to the queue val set read only mode queue add message val tx id
adds a feature to the message attribute of the jmsserver object
public void set note string name object value synchronized notes notes put name value
bind an object to a specified name in the internal notes associated
public temporary topic get temporary topic connection token dc throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt return get next get temporary topic dc
gets the temporary topic attribute of the server il object
public subscription get subscription int subscriber id throws jmsexception subscription req retrieve subscription subscriber id if req null throw new jmsexception the provided subscription does not exist return req
get a subscription for the subscriberid
public temporary queue get temporary queue connection token dc throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt return get next get temporary queue dc
gets the temporary queue attribute of the server il object
private subscription retrieve subscription int subscriber id throws jmsexception integer id new integer subscriber id synchronized subscriptions return subscription subscriptions get id
retrieve a subscription for the subscriberid
public void connection closing connection token dc throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt get next connection closing dc
description of the method
public string to string string buffer sb new string buffer sb append clustered session sb append id sb append return sb to string
return a string representation of this object
public boolean is expired if message expiration 0 return false long ts system current time millis return message expiration ts
returns true if this message reference has expired
public void check id string id throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt get next check id id
check id must not be taken
public boolean is persistent return queue instanceof persistent queue jms delivery mode delivery mode persistent
determines whether the message is persistent in the sense
public void add message connection token dc spy message message throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt get next add message dc message
add the message to the destination
public string get persistent key return queue get description
determines the persistent for storing the message
private boolean require agent restart set failing mbeans return any mbean has corrective action failing mbeans watchdog corrective action restart agent
determines whether any of code failing mbeans code requires an agent restart
public void acknowledge connection token dc acknowledgement request item throws jmsexception acknowledge dc item null
description of the method
public queue create queue connection token dc string dest throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt return get next create queue dc dest
description of the method
public long get creation time if is valid throw new illegal state exception sm get string clustered session get creation time ise return this creation time
return the time when this session was created in milliseconds since
public void set stored int stored this stored stored
called from a peristence manager cache store
public topic create topic connection token dc string dest throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt return get next create topic dc dest
description of the method
public void acknowledge connection token dc acknowledgement request item tx tx id throws jmsexception client consumer cc get client consumer dc cc acknowledge item tx id
description of the method
public void delete temporary destination connection token dc spy destination dest throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt get next delete temporary destination dc dest
description of the method
public int compare to object o message reference sm message reference o if jms priority sm jms priority return 1 if jms priority sm jms priority return 1 return int message id sm message id
this method allows message to be order on the server queues
public void transact connection token dc transaction request t throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt get next transact dc t
description of the method
public void acknowledge connection token dc acknowledgement request item throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt get next acknowledge dc item
description of the method
private boolean require machine reboot set failing mbeans return any mbean has corrective action failing mbeans watchdog corrective action restart machine
determines whether any of code failing mbeans code requires a machine reboot
public spy message receive connection token dc int subscriber id long wait throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt return get next receive dc subscriber id wait
description of the method
public void set enabled connection token dc boolean enabled throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt get next set enabled dc enabled
sets the enabled attribute of the server il object
public void connection failure connection token dc throws jmsexception we should try again this behavior should under control of a failure plugin log error the connection to client dc get client id failed connection closing dc
description of the method
public http session context get session context if session context null session context new clustered session context return session context
return the session context with which this session is associated
public void unsubscribe connection token dc int subscription id throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt get next unsubscribe dc subscription id
description of the method
public void destroy subscription connection token dc durable subscription id id throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt get next destroy subscription dc id
description of the method
public void subscribe connection token dc subscription sub throws jmsexception client consumer client consumer get client consumer dc client consumer add subscription sub
description of the method
public void connection closing connection token dc throws jmsexception synchronized clients hash map m new hash map clients m remove dc clients m get next connection closing dc
description of the method
public string check user string user name string password throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt return get next check user user name password
check user for autentication
public object get attribute string name if is valid throw new illegal state exception sm get string clustered session get attribute ise synchronized attributes return attributes get name
return the object bound with the specified name in this session or
public string authenticate string user name string password throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt return get next authenticate user name password
check user for autentication
public void unsubscribe connection token dc int subscription id throws jmsexception client consumer client consumer get client consumer dc client consumer remove subscription subscription id
description of the method
public enumeration get attribute names if is valid throw new illegal state exception sm get string clustered session get attribute names ise synchronized attributes return new enumerator attributes key set
return an code enumeration code of code string code objects
public void ping connection token dc long client time throws jmsexception if delay enabled try thread current thread sleep delay time catch interrupted exception e thread current thread interrupt get next ping dc client time
description of the method
public void destroy subscription connection token dc durable subscription id id throws jmsexception get state manager set durable subscription this id null
description of the method
private boolean invoke start method object name object name return get boolean value invoke method object name start mbean
invokes the start mbean method on an object instance
public void ping connection token dc long client time throws jmsexception get client stats dc last used system current time millis get next ping dc client time
description of the method
public void configure string conf throws exception element sec null if conf null document builder factory factory document builder factory new instance document builder parser factory new document builder document doc parser parse new input source new string reader conf sec doc get document element configure sec
configure with an xml string
public void add temporary destination connection token dc destination destination synchronized temp dests hash set set hash set temp dests get dc if set null set new hash set temp dests put dc set set add destination
remember the temporary destinations for a connection
public void remove temporary destination connection token dc spy destination destination synchronized temp dests hash set set hash set temp dests get dc if set null return set remove destination try manager remove destination destination get name catch exception e log warn unable to remove temporary destination destination e
remove a temporary destination
public void invalidate if is valid throw new illegal state exception sm get string clustered session invalidate ise cause this session to expire expire
invalidates this session and unbinds any objects bound to it
public void remove temporary destinations connection token dc synchronized temp dests hash set set hash set temp dests remove dc if set null return for iterator iterator set iterator iterator has next spy destination destination spy destination iterator next try manager remove destination destination get name catch exception e log warn unable to remove temporary destination destination e
remove all temporary destination for a connection
public queue create queue connection token dc string name throws jmsexception spy queue new queue new spy queue name if destinations contains key new queue throw new jmsexception this destination does not exist return new queue
description of the method
public string get name return elba mq jvmserver il
gives this jmx service a name
public server il get server il return new jvmserver il lookup jmsserver return null
used to construct the generic connection factory bind jndireferences
public void set connection token connection token new connection token we cannot try to cache the token since this il is stateless
sets the connection token attribute of the jvmserver il object
public void stop service try unbind jndireferences catch exception e log error problem stopping jvmserver ilservice e
stops this il and unbinds it from jndi
public object name getelbamq service return elbamq service
get the value of elbamq service
public string to string string buffer sb new string buffer sb append clustered session sb append id id sb append created new date get creation time sb append last access new date get last accessed time sb append expire time new date get last accessed time get max inactive interval 1000 sb append return sb to string
return a string representation of this object
public boolean is new if is valid throw new illegal state exception sm get string clustered session is new ise return this is new
return code true code if the client does not yet know about the
public void set invoker object name elbamq service this elbamq service elbamq service
set the value of elbamq service
public server il clone server il return this
no need to clone because there are no instance variables tha can get
public topic create topic connection token dc string name throws jmsexception spy topic new topic new spy topic name if destinations contains key new topic throw new jmsexception this destination does not exist return new topic
description of the method
public void bind jndireferences throws javax naming naming exception generic connection factory gcf new generic connection factory get server il get client connection properties spy connection factory scf new spy connection factory gcf spy xaconnection factory sxacf new spy xaconnection factory gcf get an initial context initial context ctx new initial context rebind ctx connection factory jndiref scf rebind ctx xa connection factory jndiref sxacf
binds the connection factories for this il
public void unbind jndireferences throws javax naming naming exception get an initial context initial context ctx new initial context ctx unbind connection factory jndiref ctx unbind xa connection factory jndiref
unbinds the connection factories for this il
public void delete temporary destination connection token dc spy destination dest jmsdestination destination jmsdestination destinations get dest try destination remove all messages catch exception e log error an exception happened while removing all messages from temporary destination dest get name e destinations remove dest
description of the method
public string get name return elba mq oilserver il
gives this jmx service a name
public string check user string user name string password throws jmsexception return state manager check user user name password
description of the method
public void restart processing synchronized messages messages notify all
restarts the processing of the messages in case of a recovery
public server il get server il return server il
used to construct the generic connection factory bind jndireferences
public string authenticate string id string password throws jmsexception do nothing return null
authenticate user and return a session id
public void stop service try running false unbind jndireferences catch exception e log error exception unbinding from jndi e
stops this il and unbinds it from jndi
private object invoke method object name object name string method name object return value null try return value m server invoke object name method name new object 0 new string 0 catch exception e log warning invoke method object name method name log warning e e print stack trace return value null return return value
invokes a method on an object instance
public void init org elba mq connection connection java util properties props throws java lang exception this connection connection
init method comment
public void start throws java lang exception server il oil2 server il connection get server il socket handler server il socket handler socket handler set request listner this
start method comment
public void add destination jmsdestination destination throws jmsexception if destinations contains key destination get spy destination throw new jmsexception this destination has allready been added to the server add this new destination to the list destinations put destination get spy destination destination restore the messages if destination instanceof jmstopic collection durable subs get state manager get durable subscription ids for topic spy topic destination get spy destination for iterator i durable subs iterator i has next durable subscription id sub durable subscription id i next log debug creating the durable subscription for sub jmstopic destination create durable subscription sub
adds a feature to the destination attribute of the jmsserver object
public void send request oil2 request request throws ioexception if log is trace enabled log trace sending request request try synchronized out out write byte 1 request write external out out reset out flush catch ioexception e state state connection error throw e
description of the method
private void register response slot oil2 request request slot response slot throws ioexception response slots put request request id response slot
description of the method
public void close destination spy destination dest throws jmsexception jmsdestination destination jmsdestination destinations get dest if destination null throw new invalid destination exception this destination is not open dest is it in use if destination is in use throw new jmsexception the destination is being used remove the destination from the list destinations remove dest destination close
closed a destination that was opened previously
public void set request listner oil2 request listner request listner this request listner request listner
description of the method
public void send response oil2 response response throws ioexception if log is trace enabled log trace sending response response try synchronized out out write byte 2 response write external out out reset out flush catch ioexception e state state connection error throw e
description of the method
public void set connection token connection token dest throws exception connect oil2 request request new oil2 request oil2 constants server set spy distributed connection new object dest oil2 response response socket handler synch request request response eval throws jmsexception
sets the connection token attribute of the oilserver il object
private boolean reregister mbean object name object name return false
reregisters an mbean
public string get bind address string addr 0 0 0 0 if bind address null addr bind address get host name return addr
get the interface address the oil server bind its listening port on
public string to string return elba version
description of the method