java.lang.Object
org.omg.PortableServer.Servant
org.omg.CosTrading.LookupPOA
org.openorb.trader.kernel.Lookup
- All Implemented Interfaces:
- org.omg.CosTrading.ImportAttributesOperations, org.omg.CORBA.portable.InvokeHandler, org.omg.CosTrading.LookupOperations, org.omg.CosTrading.SupportAttributesOperations, org.omg.CosTrading.TraderComponentsOperations
- public class Lookup
- extends org.omg.CosTrading.LookupPOA
This class provides an implementation of the lookup interface.
|
Field Summary |
private Kernel |
kernel
Reference to the trader kernel |
| Fields inherited from class org.omg.CosTrading.LookupPOA |
|
| Fields inherited from class org.omg.PortableServer.Servant |
|
|
Method Summary |
org.omg.CosTrading.Admin |
admin_if()
|
private java.util.Vector |
applyMaxPreference(java.util.Vector offers,
java.lang.String expression)
Applies the max preference |
private java.util.Vector |
applyMinPreference(java.util.Vector offers,
java.lang.String expression)
Applies the max preference |
private java.util.Vector |
applyPreference(java.util.Vector offers,
java.lang.String preference)
Applies the preference to the set of offers. |
private java.util.Vector |
applyRandomPreference(java.util.Vector offers)
Applies the random preference |
private java.util.Vector |
applyWithPreference(java.util.Vector offers,
java.lang.String expression)
Applies the with preference |
private boolean |
checkDynamic(org.omg.CosTrading.Property[] properties,
boolean use_dynamic)
Checks the dynamic properties |
private boolean |
checkModifiable(java.lang.String type,
boolean use_modifiable,
org.omg.CosTradingRepos.ServiceTypeRepository strep)
Checks the modifiable types |
private void |
checkPolicy(org.omg.CosTrading.Policy policy)
Checks a policy |
private boolean |
checkPolicyValue(org.omg.CosTrading.Policy policy,
boolean supports,
boolean def)
This operation is used to check a policy value and returns the value to apply. |
private int |
checkPolicyValue(org.omg.CosTrading.Policy policy,
int max,
int def)
This operation is used to check a policy value and returns the value to apply. |
private void |
checkPolicyValueType(org.omg.CosTrading.Policy policy)
Checks a policy value type |
private void |
checkPropertyName(java.lang.String name)
Checks a property name validity |
private org.omg.CosTrading.Policy[] |
decrementPolicyValue(org.omg.CosTrading.Policy[] policies,
java.lang.String policy_name,
int value)
This operation decrements a property value. |
org.omg.CosTrading.FollowOption |
def_follow_policy()
|
int |
def_hop_count()
|
int |
def_match_card()
|
int |
def_return_card()
|
int |
def_search_card()
|
private boolean |
exists(java.lang.String property_name,
org.omg.CosTradingRepos.ServiceTypeRepositoryPackage.PropStruct[] properties)
Checks if a property is defined |
private java.lang.String[] |
getCompatibleTypes(java.lang.String type,
boolean exact_type,
org.omg.CosTradingRepos.ServiceTypeRepository strep)
Returns all compatibe type names with the provided type name |
private org.openorb.trader.persistence.Offer[] |
getOffersFromTypes(java.lang.String[] types)
Returns all offers compatible with a list of types |
private org.openorb.trader.persistence.ProxyOffer[] |
getProxyOffersFromTypes(java.lang.String[] types)
Returns all proxy offers compatible with a list of types |
org.omg.CosTrading.Link |
link_if()
|
org.omg.CosTrading.Lookup |
lookup_if()
|
org.omg.CosTrading.FollowOption |
max_follow_policy()
|
int |
max_hop_count()
|
org.omg.CosTrading.FollowOption |
max_link_follow_policy()
|
int |
max_list()
|
int |
max_match_card()
|
int |
max_return_card()
|
int |
max_search_card()
|
org.omg.CosTrading.Proxy |
proxy_if()
|
void |
query(java.lang.String type,
java.lang.String constr,
java.lang.String pref,
org.omg.CosTrading.Policy[] policies,
org.omg.CosTrading.LookupPackage.SpecifiedProps desired_props,
int how_many,
org.omg.CosTrading.OfferSeqHolder the_offers,
org.omg.CosTrading.OfferIteratorHolder offer_itr,
org.omg.CosTrading.PolicyNameSeqHolder limits_applied)
This operation is used to query amongs trader offers ( and proxy offers ). |
org.omg.CosTrading.Register |
register_if()
|
boolean |
supports_dynamic_properties()
|
boolean |
supports_modifiable_properties()
|
boolean |
supports_proxy_offers()
|
org.omg.CORBA.Object |
type_repos()
|
private void |
verbose(java.lang.String msg)
Displays a verbose message |
| Methods inherited from class org.omg.PortableServer.Servant |
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
kernel
private Kernel kernel
- Reference to the trader kernel
Lookup
public Lookup(Kernel kernel)
query
public void query(java.lang.String type,
java.lang.String constr,
java.lang.String pref,
org.omg.CosTrading.Policy[] policies,
org.omg.CosTrading.LookupPackage.SpecifiedProps desired_props,
int how_many,
org.omg.CosTrading.OfferSeqHolder the_offers,
org.omg.CosTrading.OfferIteratorHolder offer_itr,
org.omg.CosTrading.PolicyNameSeqHolder limits_applied)
throws org.omg.CosTrading.IllegalServiceType,
org.omg.CosTrading.UnknownServiceType,
org.omg.CosTrading.IllegalConstraint,
org.omg.CosTrading.LookupPackage.IllegalPreference,
org.omg.CosTrading.LookupPackage.IllegalPolicyName,
org.omg.CosTrading.LookupPackage.PolicyTypeMismatch,
org.omg.CosTrading.LookupPackage.InvalidPolicyValue,
org.omg.CosTrading.IllegalPropertyName,
org.omg.CosTrading.DuplicatePropertyName,
org.omg.CosTrading.DuplicatePolicyName
- This operation is used to query amongs trader offers ( and proxy offers ).
lookup_if
public org.omg.CosTrading.Lookup lookup_if()
register_if
public org.omg.CosTrading.Register register_if()
link_if
public org.omg.CosTrading.Link link_if()
proxy_if
public org.omg.CosTrading.Proxy proxy_if()
admin_if
public org.omg.CosTrading.Admin admin_if()
supports_modifiable_properties
public boolean supports_modifiable_properties()
supports_dynamic_properties
public boolean supports_dynamic_properties()
supports_proxy_offers
public boolean supports_proxy_offers()
type_repos
public org.omg.CORBA.Object type_repos()
def_search_card
public int def_search_card()
max_search_card
public int max_search_card()
def_match_card
public int def_match_card()
max_match_card
public int max_match_card()
def_return_card
public int def_return_card()
max_return_card
public int max_return_card()
max_list
public int max_list()
def_hop_count
public int def_hop_count()
max_hop_count
public int max_hop_count()
def_follow_policy
public org.omg.CosTrading.FollowOption def_follow_policy()
max_follow_policy
public org.omg.CosTrading.FollowOption max_follow_policy()
max_link_follow_policy
public org.omg.CosTrading.FollowOption max_link_follow_policy()
checkPropertyName
private void checkPropertyName(java.lang.String name)
throws org.omg.CosTrading.IllegalPropertyName
- Checks a property name validity
checkPolicy
private void checkPolicy(org.omg.CosTrading.Policy policy)
throws org.omg.CosTrading.LookupPackage.IllegalPolicyName,
org.omg.CosTrading.LookupPackage.PolicyTypeMismatch,
org.omg.CosTrading.LookupPackage.InvalidPolicyValue
- Checks a policy
checkPolicyValueType
private void checkPolicyValueType(org.omg.CosTrading.Policy policy)
throws org.omg.CosTrading.LookupPackage.PolicyTypeMismatch
- Checks a policy value type
checkPolicyValue
private int checkPolicyValue(org.omg.CosTrading.Policy policy,
int max,
int def)
- This operation is used to check a policy value and returns the value to apply.
checkPolicyValue
private boolean checkPolicyValue(org.omg.CosTrading.Policy policy,
boolean supports,
boolean def)
- This operation is used to check a policy value and returns the value to apply.
exists
private boolean exists(java.lang.String property_name,
org.omg.CosTradingRepos.ServiceTypeRepositoryPackage.PropStruct[] properties)
- Checks if a property is defined
decrementPolicyValue
private org.omg.CosTrading.Policy[] decrementPolicyValue(org.omg.CosTrading.Policy[] policies,
java.lang.String policy_name,
int value)
- This operation decrements a property value. If the property is not found, the value is set as the property value.
checkDynamic
private boolean checkDynamic(org.omg.CosTrading.Property[] properties,
boolean use_dynamic)
- Checks the dynamic properties
checkModifiable
private boolean checkModifiable(java.lang.String type,
boolean use_modifiable,
org.omg.CosTradingRepos.ServiceTypeRepository strep)
- Checks the modifiable types
getCompatibleTypes
private java.lang.String[] getCompatibleTypes(java.lang.String type,
boolean exact_type,
org.omg.CosTradingRepos.ServiceTypeRepository strep)
- Returns all compatibe type names with the provided type name
getOffersFromTypes
private org.openorb.trader.persistence.Offer[] getOffersFromTypes(java.lang.String[] types)
- Returns all offers compatible with a list of types
getProxyOffersFromTypes
private org.openorb.trader.persistence.ProxyOffer[] getProxyOffersFromTypes(java.lang.String[] types)
- Returns all proxy offers compatible with a list of types
verbose
private void verbose(java.lang.String msg)
- Displays a verbose message
applyPreference
private java.util.Vector applyPreference(java.util.Vector offers,
java.lang.String preference)
throws org.omg.CosTrading.LookupPackage.IllegalPreference
- Applies the preference to the set of offers.
applyRandomPreference
private java.util.Vector applyRandomPreference(java.util.Vector offers)
- Applies the random preference
applyWithPreference
private java.util.Vector applyWithPreference(java.util.Vector offers,
java.lang.String expression)
throws org.omg.CosTrading.LookupPackage.IllegalPreference
- Applies the with preference
applyMaxPreference
private java.util.Vector applyMaxPreference(java.util.Vector offers,
java.lang.String expression)
throws org.omg.CosTrading.LookupPackage.IllegalPreference
- Applies the max preference
applyMinPreference
private java.util.Vector applyMinPreference(java.util.Vector offers,
java.lang.String expression)
throws org.omg.CosTrading.LookupPackage.IllegalPreference
- Applies the max preference