Package org.apache.camel.component.mock
Class TimeClause
- java.lang.Object
-
- org.apache.camel.component.mock.TimeClause
-
- All Implemented Interfaces:
org.apache.camel.BinaryPredicate
,org.apache.camel.Predicate
public class TimeClause extends Object implements org.apache.camel.BinaryPredicate
Represents time based clauses for setting expectations on the mocks. Such as time constrains for the received messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
TimeClause.TimeClassUnit
-
Constructor Summary
Constructors Constructor Description TimeClause(org.apache.camel.Expression left, org.apache.camel.Expression right)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPrevious()
void
beforeNext()
TimeClause.TimeClassUnit
between(int from, int to)
org.apache.camel.Expression
getLeft()
protected String
getOperationText()
String
getOperator()
org.apache.camel.Expression
getRight()
boolean
matches(org.apache.camel.Exchange exchange)
protected boolean
matches(org.apache.camel.Exchange exchange, Object leftValue, Object rightValue)
String
matchesReturningFailureMessage(org.apache.camel.Exchange exchange)
TimeClause.TimeClassUnit
noLaterThan(int period)
String
toString()
-
-
-
Method Detail
-
noLaterThan
public TimeClause.TimeClassUnit noLaterThan(int period)
-
between
public TimeClause.TimeClassUnit between(int from, int to)
-
beforeNext
public void beforeNext()
-
afterPrevious
public void afterPrevious()
-
getLeft
public org.apache.camel.Expression getLeft()
- Specified by:
getLeft
in interfaceorg.apache.camel.BinaryPredicate
-
getRight
public org.apache.camel.Expression getRight()
- Specified by:
getRight
in interfaceorg.apache.camel.BinaryPredicate
-
matches
public boolean matches(org.apache.camel.Exchange exchange)
- Specified by:
matches
in interfaceorg.apache.camel.Predicate
-
matchesReturningFailureMessage
public String matchesReturningFailureMessage(org.apache.camel.Exchange exchange)
- Specified by:
matchesReturningFailureMessage
in interfaceorg.apache.camel.BinaryPredicate
-
matches
protected boolean matches(org.apache.camel.Exchange exchange, Object leftValue, Object rightValue)
-
getOperator
public String getOperator()
- Specified by:
getOperator
in interfaceorg.apache.camel.BinaryPredicate
-
getOperationText
protected String getOperationText()
-
-