Package org.openas2.logging
Class SocketLogger
- java.lang.Object
-
- org.openas2.BaseComponent
-
- org.openas2.logging.BaseLogger
-
- org.openas2.logging.SocketLogger
-
public class SocketLogger extends BaseLogger
class to write log meesage to a socket- Since:
- october 2007.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
ipAddr
static int
iQUEUESIZE
static java.lang.String
PARAM_IPADDDR
static java.lang.String
PARAM_PORTID
private int
port
-
Fields inherited from class org.openas2.logging.BaseLogger
PARAM_EXCEPTIONS, PARAM_SHOW, VALUE_SHOW_ALL, VALUE_SHOW_EXCEPTIONS, VALUE_SHOW_INFO, VALUE_SHOW_TERMINATED
-
-
Constructor Summary
Constructors Constructor Description SocketLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doLog(java.lang.Throwable t, boolean terminated)
void
doLog(Level level, java.lang.String msgText, Message as2Msg)
protected java.lang.String
getShowDefaults()
void
init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters)
Component lifecycle hook.void
sendToSocket(java.lang.String msgText)
-
Methods inherited from class org.openas2.logging.BaseLogger
getFormatter, isLogExceptionTrace, isLogging, isShowing, log, log, setFormatter, setLogExceptionTrace
-
Methods inherited from class org.openas2.BaseComponent
destroy, getName, getParameter, getParameter, getParameterInt, getParameters, getSession, setParameter, setParameter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openas2.Component
destroy, getName, getParameters, getSession
-
-
-
-
Field Detail
-
PARAM_PORTID
public static final java.lang.String PARAM_PORTID
- See Also:
- Constant Field Values
-
PARAM_IPADDDR
public static final java.lang.String PARAM_IPADDDR
- See Also:
- Constant Field Values
-
iQUEUESIZE
public static final int iQUEUESIZE
- See Also:
- Constant Field Values
-
port
private int port
-
ipAddr
private java.lang.String ipAddr
-
-
Method Detail
-
init
public void init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters) throws OpenAS2Exception
Description copied from interface:Component
Component lifecycle hook. After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.- Specified by:
init
in interfaceComponent
- Overrides:
init
in classBaseLogger
- Parameters:
session
- the component uses this object to access other componentsparameters
- configuration values for the component- Throws:
OpenAS2Exception
- If an error occurs while initializing the component- See Also:
Session
-
doLog
public void doLog(Level level, java.lang.String msgText, Message as2Msg)
- Specified by:
doLog
in classBaseLogger
-
sendToSocket
public void sendToSocket(java.lang.String msgText)
-
getShowDefaults
protected java.lang.String getShowDefaults()
- Specified by:
getShowDefaults
in classBaseLogger
-
doLog
protected void doLog(java.lang.Throwable t, boolean terminated)
- Specified by:
doLog
in classBaseLogger
-
-