Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
joram
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
joram
joram
Commits
c0fb60d8
Commit
c0fb60d8
authored
Jan 12, 2021
by
Andre Freyssinet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds JMX monitoring for acquisition handler.
parent
d51c33e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
9 deletions
+29
-9
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/dest/AcquisitionModule.java
.../java/org/objectweb/joram/mom/dest/AcquisitionModule.java
+8
-6
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/dest/AcquisitionQueue.java
...n/java/org/objectweb/joram/mom/dest/AcquisitionQueue.java
+14
-1
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/dest/AcquisitionQueueMBean.java
...a/org/objectweb/joram/mom/dest/AcquisitionQueueMBean.java
+7
-2
No files found.
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/dest/AcquisitionModule.java
View file @
c0fb60d8
/*
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2010 - 20
17
ScalAgent Distributed Technologies
* Copyright (C) 2010 - 20
21
ScalAgent Distributed Technologies
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -48,7 +48,7 @@ import fr.dyade.aaa.common.Debug;
...
@@ -48,7 +48,7 @@ import fr.dyade.aaa.common.Debug;
*/
*/
public
class
AcquisitionModule
implements
ReliableTransmitter
{
public
class
AcquisitionModule
implements
ReliableTransmitter
{
public
static
Logger
logger
=
Debug
.
getLogger
(
AcquisitionModule
.
class
.
getName
());
public
static
Logger
logger
=
Debug
.
getLogger
(
AcquisitionModule
.
class
.
getName
());
/** Verify that one and only one correct interface is implemented. */
/** Verify that one and only one correct interface is implemented. */
public
static
void
checkAcquisitionClass
(
String
className
)
throws
Exception
{
public
static
void
checkAcquisitionClass
(
String
className
)
throws
Exception
{
if
(
className
==
null
)
{
if
(
className
==
null
)
{
...
@@ -70,11 +70,9 @@ public class AcquisitionModule implements ReliableTransmitter {
...
@@ -70,11 +70,9 @@ public class AcquisitionModule implements ReliableTransmitter {
clazz
=
clazz
.
getSuperclass
();
clazz
=
clazz
.
getSuperclass
();
}
}
if
(
isDaemon
&&
isHandler
)
{
if
(
isDaemon
&&
isHandler
)
{
throw
new
Exception
(
"Acquisition class "
+
className
throw
new
Exception
(
"Acquisition class "
+
className
+
" can't implement both AcquisitionHandler and AcquisitionDaemon interfaces."
);
+
" can't implement both AcquisitionHandler and AcquisitionDaemon interfaces."
);
}
else
if
(!
isDaemon
&&
!
isHandler
)
{
}
else
if
(!
isDaemon
&&
!
isHandler
)
{
throw
new
Exception
(
"Acquisition class "
+
className
throw
new
Exception
(
"Acquisition class "
+
className
+
" must implement either AcquisitionHandler or AcquisitionDaemon interface."
);
+
" must implement either AcquisitionHandler or AcquisitionDaemon interface."
);
}
}
}
}
...
@@ -129,6 +127,10 @@ public class AcquisitionModule implements ReliableTransmitter {
...
@@ -129,6 +127,10 @@ public class AcquisitionModule implements ReliableTransmitter {
/** <code>true</code> if the acquisition daemon is running. */
/** <code>true</code> if the acquisition daemon is running. */
private
boolean
running
;
private
boolean
running
;
public
boolean
isRunning
()
{
return
running
;
}
public
AcquisitionModule
(
Destination
destination
,
String
className
,
Properties
properties
)
{
public
AcquisitionModule
(
Destination
destination
,
String
className
,
Properties
properties
)
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
{
logger
.
log
(
BasicLevel
.
DEBUG
,
"AcquisitionModule.<init> prop = "
+
properties
);
logger
.
log
(
BasicLevel
.
DEBUG
,
"AcquisitionModule.<init> prop = "
+
properties
);
...
...
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/dest/AcquisitionQueue.java
View file @
c0fb60d8
/*
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2010 - 20
15
ScalAgent Distributed Technologies
* Copyright (C) 2010 - 20
21
ScalAgent Distributed Technologies
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -295,6 +295,19 @@ public class AcquisitionQueue extends Queue implements AcquisitionQueueMBean {
...
@@ -295,6 +295,19 @@ public class AcquisitionQueue extends Queue implements AcquisitionQueueMBean {
return
null
;
return
null
;
}
}
/**
* Returns the acquisition handler status.
* To be use by MBean interface.
*
* @return the acquisition handler status.
*/
@Override
public
boolean
isHandlerRunning
()
{
if
(
acquisitionModule
==
null
)
return
false
;
return
acquisitionModule
.
isRunning
();
}
/**
/**
* Start the handler.
* Start the handler.
*
*
...
...
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/dest/AcquisitionQueueMBean.java
View file @
c0fb60d8
/*
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2010 - 20
17
ScalAgent Distributed Technologies
* Copyright (C) 2010 - 20
21
ScalAgent Distributed Technologies
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -72,10 +72,15 @@ public interface AcquisitionQueueMBean extends QueueMBean, AcquisitionMBean {
...
@@ -72,10 +72,15 @@ public interface AcquisitionQueueMBean extends QueueMBean, AcquisitionMBean {
* @return the minimum threshold of waiting messages in the destination.
* @return the minimum threshold of waiting messages in the destination.
*/
*/
long
getPendingMin
();
long
getPendingMin
();
public
String
dumpProperties
();
public
String
dumpProperties
();
/**
* Returns the acquisition handler status.
* @return the acquisition handler status.
*/
public
boolean
isHandlerRunning
();
/**
/**
* Starts the handler.
* Starts the handler.
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment